Skip to content

Instantly share code, notes, and snippets.

@susanli2016
Last active January 16, 2022 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save susanli2016/6e5921ff7ac88b421528fa042db03cbb to your computer and use it in GitHub Desktop.
Save susanli2016/6e5921ff7ac88b421528fa042db03cbb to your computer and use it in GitHub Desktop.
grouped_df.loc[grouped_df['customer_id'] == 2].sort_values('Quantity', ascending=False)[['customer_id', 'Description', 'Quantity']].head(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment