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

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

titanic_train['Age'].fillna(titanic_train['Age'].median(), inplace=True)
titanic_train['Embarked'].fillna('S', inplace=True)

titanic_train['Sex'].replace({'male': 0, 'female': 1}, inplace=True)
titanic_train['Embarked'].replace({'S': 0, 'C': 1, 'Q': 2}, inplace=True)
titanic_train.describe()