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

d['Male'] = d['Sex'] == 'male'
n = d['Age'].mean()
d['Class1'] = d['Pclass'] == 1
d['Class2'] = d['Pclass'] == 2
d['Age'].fillna(n, inplace=True)