ImportError: cannot import name ‘Imputer‘ from ‘sklearn.preprocessing‘ 已解决

from sklearn.preprocessing import Imputer

导入sklean.preprocessing时报错:

ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing' (D:\anaconda3\lib\site-packag。。。

解决办法:

将导包语句改为

from sklearn.impute import SimpleImputer

问题解决咯!

参考博客:(72条消息) 已解决ImportError: cannot import name ‘Imputer‘ from ‘sklearn.preprocessing_无 羡ღ的博客-CSDN博客

你可能感兴趣的:(sklearn,python,机器学习)