1 min readFeb 16, 2019
If you just want a raw count don’t use values
and change aggfunc to ‘size’
df.pivot_talbe(index=['Pclass', 'Survived'], columns='Sex', aggfunc='size')
If you just want a raw count don’t use values
and change aggfunc to ‘size’
df.pivot_talbe(index=['Pclass', 'Survived'], columns='Sex', aggfunc='size')
Author of Master Data Analysis with Python and Founder of Dunder Data