python报'DataFrame' object has no attribute 'as_matrix'错误

在python中报错

'DataFrame' object has no attribute 'as_matrix'

 

解决办法

https://pandas.pydata.org/pandas-docs/stable/search.html?q=as_matrix

DataFrame.as_matrix is deprecated. Use DataFrame.values instead (GH18458).

将as_matrix()替换为values,如果替换为values()会报一下错误

'numpy.ndarray' object is not callable

 

 

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页