I have a pandas df like the following:
User Purchase_Count Location_Count
1 2 3
2 10 5
3 5 1
4 20 4
5 2 3
6 2 3
7 10 5
How would I add a column that calculates the % of the coordinate pair (Purchse_Count[i], Location_Count[i])
of the total entries.
so for example I would like the df to look like:
User Purchase_Count Location_Count %
1 2 3 42.85
2 10 5 28.57
3 5 1 14.28
4 20 4 14.28
5 2 3 42.85
6 2 3 42.85
7 10 5 28.57