OneHotEncoder没有啥属性

AttributeError: ‘OneHotEncoder’ o has no attribute ‘categories_’

  • 解决办法:
  • 更新sklearn库
  • 1.anaconda的Promote
  • 2.pip list 可以查看当前已经安装的包和版本
  • 3.更新sklearn
  • 输入”conda update scikit-learn”

AttributeError: ‘OneHotEncoder’ object has no attribute ‘n_values_’
安装指定version的包:
pip install scikit-learn==0.19.2

参考连

  • 添加链接描述

你可能感兴趣的:(python)