Skip to content

Instantly share code, notes, and snippets.

@hute37
Forked from aniruddha27/GroupBy_18.py
Created June 15, 2020 09:10
Show Gist options
  • Save hute37/d44196a5057cee098e50d6dd7e44bd74 to your computer and use it in GitHub Desktop.
Save hute37/d44196a5057cee098e50d6dd7e44bd74 to your computer and use it in GitHub Desktop.
df.groupby(['Outlet_Type','Item_Type']).agg(mean_MRP=('Item_MRP',np.mean),mean_Sales=('Item_Outlet_Sales',np.mean))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment