解決辦法:
更新sklearn庫
具體方法:
1.打開anaconda下的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