application_vnd.jupyter.stderr_output_1.png
import pandas as pd

import seaborn as sns

train_df = pd.read_csv('../input/train.csv')
test_df = pd.read_csv('../input/test.csv')

sns.countplot('Survived', hue='Sex', data=train_df)
print(train_df[train_df['Sex'] == 'male']['Survived'].value_counts())
print(train_df[train_df['Sex'] == 'male']['Survived'].value_counts(normalize=True))
print(train_df[train_df['Sex'] == 'female']['Survived'].value_counts())
print(train_df[train_df['Sex'] == 'female']['Survived'].value_counts(normalize=True))