text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df = pd.read_csv('../input/titanic/train.csv')
df1 = pd.read_csv('../input/titanic/train.csv')

df['Age'] = df['Age'].fillna(df['Age'].median())

df.dtypes

df['Sex'].value_counts()

fig = plt.figure(figsize=(10, 10))
sns.distplot(df.loc[df['Survived'] == 1]['Sex'])
sns.distplot(df.loc[df['Survived'] == 0]['Sex'])