text_html_output_1.png
import pandas as pd

train_data = pd.read_csv('../input/titanic/train.csv')
test_data = pd.read_csv('../input/titanic/test.csv')

train_data[['Sex', 'Survived']].groupby(['Sex'], as_index=False).mean()