特徵工程初步學習

基本數據處理

1.缺失值的填充

df_train['Age'].fillna(value = df_train['Age'].mean())  #df_train數據包含關鍵字age的column,中間的缺失值用該列平均值填充。

用sklearn的包

from sklearn.preprocessing import Imputer
help(Imputer)
Imputation transformer for completing missing values.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章