text_html_output_1.png
import pandas as pd

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

train_data = pd.read_csv('../input/titanic/train.csv')
test_data = pd.read_csv('../input/titanic/test.csv')

train_data.shape

train_data.isnull().any()

train_data.apply(lambda x: x.isnull().sum() / len(x) * 100)

train_data['Cabin'] = train_data.Cabin.fillna(train_data['Cabin'].mode()[1])
train_data['Age'] = train_data['Age'].fillna(train_data['Age'].mean())

train_data.columns