Skip to content

Instantly share code, notes, and snippets.

@susanli2016
Created January 16, 2022 07:38
Show Gist options
  • Save susanli2016/0b9a729bfc9b4b44fd7df48742cc6465 to your computer and use it in GitHub Desktop.
Save susanli2016/0b9a729bfc9b4b44fd7df48742cc6465 to your computer and use it in GitHub Desktop.
print(f'Number of unique customers: {grouped_df.CustomerID.nunique()}')
print(f'Number of unique items: {grouped_df.StockCode.nunique()}')
print(f'Average purchase quantity per interaction: {int(grouped_df.Quantity.mean())}')
print(f'Minimum purchase quantity per interaction: {grouped_df.Quantity.min()}')
print(f'Maximum purchase quantity per interaction: {grouped_df.Quantity.max()}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment