当前位置:网站首页>Successfully solved: importerror: cannot import name 'import' from 'sklearn preprocessing
Successfully solved: importerror: cannot import name 'import' from 'sklearn preprocessing
2022-06-10 06:45:00 【Xiao Yuan itsuper】
Successfully solved :ImportError: cannot import name ‘Imputer‘ from ‘sklearn.preprocessing
Preface
This article has been included in :《 a farewell Bug》 special column
This column is used to record all kinds of difficulties encountered in study and work Bug Problems and Solutions + resolvent , Including program installation 、 Problems in running the program, etc , If you encounter other problems after subscribing to the column, you can chat privately to help solve them !!!
List of articles
Report the wrong question
My code :
from sklearn.preprocessing import Imputer
Error message :
ImportError: cannot import name 'Imputer' from 'sklearn.preprocessing' (D:\Python3.8\lib\site-packages\sklearn\preprocessing\__init__.py)

Error reason
Error report translation :
ImportError: from “sklearn” Import name “inputer”. Preprocessing '(D:\Python3.8\lib\site packages\sklearn\preprocessing\uu init\uuuuuuu.py)
Error reason :0.20 New features :SimpleImputer Instead of the old sklearn.preprocessing.Imputer
resolvent
1、 Replace the import library statement with the following statement
from sklearn.impute import SimpleImputer
2、 The original used in the program Imputer Change it to SimpleImputer that will do

3、 Run again successfully
[[ 1.28620952e-15 3.82970843e+00]
[ 5.74456265e+00 -1.91485422e+00]
[-5.74456265e+00 -1.91485422e+00]]
边栏推荐
- What to say and what not to say during the interview - May 23, 2022
- Opengauss database ODBC environment connection configuration (Windows)
- In depth understanding of exit vs \u exit
- Why can't lldb print view bounds? - Why can't LLDB print view. bounds?
- Data migration of OLAP tool Doris or starrocks
- Determine whether the process has administrator privileges
- SQL practice: SQL solves problems in recent X days
- Yosezang original signature locator signaturetest v6.36 RLS release
- 在 Kubernetes 中基于 StatefulSet 部署 MySQL(下)
- ShardingSphere实践(6)——弹性伸缩
猜你喜欢

Teleyecontroller v8.16 release complete registry function

White plus black over 360 startup item tool source code release multiple files over startup item code

tensorflow实验九----------泰坦尼克号

618. How to prepare for the great promotion

Teleyecontroller v8.69 reconfiguration of keyboard recording function release by:yose

Virtual machine network connection mode

Unlock TRPC high performance password: introduction to network scheme!

Leetcode675. 为高尔夫比赛砍树:优先队列+广度优先找最短路径

【计量经济学】工具变量估计与两阶段最小二乘法

TAP 系列文章 2 | Tanzu Application Platform v1.1 安装配置步骤
随机推荐
scala fastjson 获取jsonArray中 某个key的最大值
成功解决:ImportError: cannot import name ‘Imputer‘ from ‘sklearn.preprocessing
Multiple solutions to one problem × 5 (array + circular linked list)
Cannot open 'appears when Proteus simulates p * * * \lisa5476 Error in SDF '
Jerry's aicmd command [chapter]
openGauss 数据库 ODBC 环境连接配置 (Windows)
loj10131. 「一本通 4.4 例 2」暗的连锁 题解 树上差分(边差分)
判斷進程是否有管理員權限
问题:拦截导弹
Model learning comprehension in Multi-Agent Reinforcement Learning Based on Model
The game crashed after the computer added a new memory module, and the browser blocked the blue screen of the computer
Longest common subsequence
How to solve mysql1045 and find the prompt is not an internal command
微信团队分享:微信后台在海量并发请求下是如何做到不崩溃的
Print linked list from end to end of sword finger offer
Qt--- create dialog box 3: implementation of shape variable dialog box
Dual environment pointer for D, deprecated
YoseZang 原创 特征码定位器 SignatureTest V6.36 Rls 发布
Alibaba cloud OCR image recognition process
Problem: interceptor missile