application_vnd.jupyter.stderr_output_1.png
d = pd.read_csv('../input/train.csv')

t = pd.read_csv('../input/test.csv')

t['Male'] = t['Sex'] == 'male'
nn = t['Age'].mean()
t['Class1'] = t['Pclass'] == 1
t['Class2'] = t['Pclass'] == 2
t['Age'].fillna(nn, inplace=True)
f = t['Fare'].mean()
t['Fare'].fillna(f, inplace=True)