Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 16, 2020 18:52
Show Gist options
  • Save aniruddha27/d830859f2ed6f23dd963884dee565b76 to your computer and use it in GitHub Desktop.
Save aniruddha27/d830859f2ed6f23dd963884dee565b76 to your computer and use it in GitHub Desktop.
#columns
table = pd.pivot_table(df,index=['Sex'],columns=['Pclass'],values=['Survived'],aggfunc=np.sum)
table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment