Python Forum

Full Version: Python count
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

Cust Can Soap Fudge Gun
A
B
C
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

Cust Can Soap Fudge Gun
A
B
C
What have you tried?
And what exactly is the problem you are having with your code?