text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import warnings

warnings.simplefilter(action='ignore', category=FutureWarning)
pd.set_option('display.float_format', lambda x: '%.3f' % x)

train = pd.read_csv('../input/titanic/train.csv', index_col='PassengerId')
test = pd.read_csv('../input/titanic/test.csv', index_col='PassengerId')

train.isnull().sum()

sns.set(font_scale=1.4)

sns.set_style('whitegrid')

plt.figure(figsize=(10, 6))
sns.set_style('whitegrid')
sns.countplot(x='Survived', hue='Sex', data=train, palette='RdBu_r')
plt.title('Survived/not survived by sex')
plt.show()