报错代码:
from sklearn.preprocessing import Imputer
报错:
ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing'
报错原因:
sklearn版本不同,更新后针对这段代码会报错。
解决办法:
修改导入包的程序。
from sklearn.impute import SimpleImputer
问题得到解决。
报错代码:
from sklearn.preprocessing import Imputer
报错:
ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing'
报错原因:
sklearn版本不同,更新后针对这段代码会报错。
解决办法:
修改导入包的程序。
from sklearn.impute import SimpleImputer
问题得到解决。