Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active March 17, 2020 07:26
Show Gist options
  • Save aniruddha27/cdae4dda3b71f048073554ad9e929da5 to your computer and use it in GitHub Desktop.
Save aniruddha27/cdae4dda3b71f048073554ad9e929da5 to your computer and use it in GitHub Desktop.
table = pd.pivot_table(df,index=['Sex','Pclass'],values=['Survived'], aggfunc=np.mean)
table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment