我在Python程序中无法导入StandardScaler
类。顺便说一下,我使用的是Spyder,我不明白我卡在哪里了。它显示以下错误信息:
File "<ipython-input-2-85a91f244dd6>", line 25, in <module> from sklearn.preprocessing import StandardScalarImportError: cannot import name 'StandardScalar'
回答:
这是因为你的拼写不正确,所以会产生错误。如果将来你遇到任何问题,可以使用dir函数查看所有方法和模块。例如,print(dir(sklearn))