Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 12, 2020 17:26
Show Gist options
  • Save aniruddha27/f2a008305e5ba2df362bf1b4ba03ee9b to your computer and use it in GitHub Desktop.
Save aniruddha27/f2a008305e5ba2df362bf1b4ba03ee9b to your computer and use it in GitHub Desktop.
table = pd.pivot_table(data=df,index='category',values='num_orders',aggfunc=np.sum)
table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment