text_plain_output_1.png
import numpy as np # linear algebra

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

import seaborn as sns

PATH = '../input/titanic/'

df_train = pd.read_csv(f'{PATH}/train.csv', low_memory=False)
df_test = pd.read_csv(f'{PATH}/test.csv', low_memory=False)

df_train.dtypes

df_train['Age_NA'] = np.where(df_train.Age.isnull(), 1, 0)
df_test['Age_NA'] = np.where(df_test.Age.isnull(), 1, 0)

a = sns.FacetGrid(df_train, hue='Survived', aspect=4)
a.map(sns.kdeplot, 'Age', shade=True)
a.set(xlim=(0, df_train['Age'].max()))
a.add_legend()
print('Skew for train data:', df_train.Age.skew())