Skip to content

Instantly share code, notes, and snippets.

@anbento0490
Last active May 2, 2020 18:22
Show Gist options
  • Save anbento0490/1078579f2013bd9546785eea2ee4b65d to your computer and use it in GitHub Desktop.
Save anbento0490/1078579f2013bd9546785eea2ee4b65d to your computer and use it in GitHub Desktop.
orders["Run Avg (£)"] = orders.groupby(['Customer ID', 'Order Month'])['Amount Paid (£)'].transform('mean').round(1)
orders.head(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment