text_html_output_1.png
import pandas as pd

import pandas as pd
t = pd.read_csv('../input/titanic/train.csv')
t

pd.pivot_table(t, index='SibSp', columns='Parch', values='Survived', aggfunc='count', margins=True)

pd.pivot_table(t, index='SibSp', values='Survived', aggfunc='count', margins=True)

pd.pivot_table(t, index='SibSp', columns='Survived', values='PassengerId', aggfunc='count', margins=True)

t['Title'] = t.Name.str.extract(' ([A-Za-z]+)\\.', expand=False)
pd.crosstab(t['Title'], t['Sex'])

t