ImportError: cannot import name ‘Imputer‘ from ‘sklearn.preprocessing‘

代码

from sklearn.preprocessing import Imputer

报错

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-2e97a66a2985> in <module>
----> 1 from sklearn.preprocessing import Imputer

ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing' (C:\Anaconda\lib\site-packages\sklearn\preprocessing\__init__.py)

原因

此库已更换地址

解决

from sklearn.impute import SimpleImputer

你可能感兴趣的:(BUG,python,sklearn,python)