📅  最后修改于: 2022-03-11 14:46:55.796000             🧑  作者: Mango
if choice == 'median':
new_df['Age'] = new_df.groupby(['Sex', 'Pclass'])['Age'].transform(func = lambda x: x.fillna(round(x.median(),1)))