text_html_output_1.png
import pandas as pd

df = pd.read_csv('../input/train.csv')
df_test = pd.read_csv('../input/test.csv')
df['Sex'] = df.Sex.apply(lambda x: 1 if x == 'male' else 0)
df_test['Sex'] = df_test.Sex.apply(lambda x: 1 if x == 'male' else 0)
df['Embarked'] = df.Embarked.apply(lambda x: str(x))
df_test['Embarked'] = df_test.Embarked.apply(lambda x: str(x))
df.Age.fillna(29.699118, inplace=True)
df_test.Age.fillna(29.699118, inplace=True)
df_test.Fare.fillna(35, inplace=True)

df.Embarked.unique()