How to count number of products for each category in python

python

#1

Can somebody help me with the below problem. I want to convert the comma delimited values into count of products for each customer

Cust     Prod
A      Can,   Soap
C      Can,   Soap
A      Can,   Soap
A      Can,   Fudge
B      Can,   Fudge
B      Can,   Fudge
C      Gun
C      Gun

Now I want the following count values

Cust Can Soap Fudge Gun
A 
B 
C

#2

Do you have the data available in a csv file? Can you share the screenshot of the data, which will help us understand how the data looks like?