Hi. I've got a dataframe of the following pattern:
Date Item Purchased
01/01/08 Fruit 48
01/01/08 Confectionary 42
01/01/08 Appliance 11
01/01/08 Total 101
01/06/08 Confectionary 16
01/06/08 Fruit 19
01/06/08 Appliance 50
01/06/08 Total 85
What I'd like to do is create a column that converts the value in the 'Purchased' row to its equivalent percentage of the total on that day. So Fruit on 01/06/08, represents ~22.35% of the total number of items purchased on 01/06/08 (total being 85). Anyone have any ideas on how to achieve this?