I have found out the most profitable products in my dataframe by using:
df.groupby('ProductName')['ProfitPerOrder'].sum().sort_values().tail()
It gives me the output below. each ProductName has a ProductCategory. How do I display the category next to the product name in the output below?
ProductName
WFS Shoes 29033.887659
RDL Suit 45845.253318
Tennis Suit 46848.513342
Davenport Shoes 127103.915707
Halter Dress 314155.742025
Name: ProfitPerOrder, dtype: float64