Example dataframe:
Item_Name Price
Basket 2
Carpet 5
Basket 3
Carpet 10
Rug 2
Rug 3
foo 1
I want to add a column called top 3 which indicates whether or not the item is top 3 based on total price summed for each item. The total price or basket is 5, carpet is 15, rug is 5 and foo is 1. So, everything except foo falls in the top 3. How do I do this? I need a new column named "top" 3 that indicates yes or no.