text_plain_output_1.png
import pandas as pd        # For loading and processing the dataset

df_train = pd.read_csv('../input/train.csv')

df_train = df_train.drop(['PassengerId', 'Name', 'Ticket', 'Cabin'], axis=1)

df_train = pd.concat([df_train, pd.get_dummies(df_train['Embarked'], prefix='Embarked')], axis=1)
df_train = df_train.drop('Embarked', axis=1)

print("Number of missing 'Age' values: {:d}".format(df_train['Age'].isnull().sum()))
df_train['Age'] = df_train['Age'].fillna(df_train['Age'].mean())