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)

print(df_train['Age_NA'].value_counts())
sns.factorplot('Age_NA', 'Survived', data=df_train)