📌  相关文章
📜  def conditional_impute(input_df, choice='median') - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:55.796000             🧑  作者: Mango

代码示例2
if choice == 'median':
        new_df['Age'] = new_df.groupby(['Sex', 'Pclass'])['Age'].transform(func = lambda x: x.fillna(round(x.median(),1)))