new version of scikit-learn api
This commit is contained in:
@ -109,6 +109,9 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# If you use the newest version of sklearn, use the lines of code commented out",
|
||||
"# from sklearn.impute import SimpleImputer",
|
||||
"# imputer = SimpleImputer(missing_values=\"NaN\", strategy=\"mean\")",
|
||||
"from sklearn.preprocessing import Imputer\n",
|
||||
"# axis=0表示按列进行\n",
|
||||
"imputer = Imputer(missing_values = \"NaN\", strategy = \"mean\", axis = 0)\n",
|
||||
|
||||
Reference in New Issue
Block a user