def impute_age(cols):
Age = cols[0] //Line1
Pclass = cols[1] //Line 2
if pd.isnull(Age):
if Pclass == 1:
return 37
elif Pclass == 2:
return 29
else:
return 24
else:
return Age
Aucun commentaire:
Enregistrer un commentaire