Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active September 21, 2021 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aniruddha27/927b23d27aa6fbeaf5ca5b5456928486 to your computer and use it in GitHub Desktop.
Save aniruddha27/927b23d27aa6fbeaf5ca5b5456928486 to your computer and use it in GitHub Desktop.
df_apply = df.groupby(['Outlet_Establishment_Year'])['Item_MRP'].apply(lambda x: x - x.mean())
df_apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment