How to write sklearn.SimpleImputer in a function using a dataframe?

前端 未结 0 961
陌清茗
陌清茗 2021-01-25 07:52
from sklearn.impute import SimpleImputer

imputer = SimpleImputer(strategy=\'most_frequent\')
titanic_df[\'age\'] = imputer.fit_transform(titanic_df[[\'age\']])
titanic_         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题