Series数据类型没有reshape函数
解决办法:
1.用values方法将Series对象转化成numpy的ndarray,再用ndarray的reshape方法.
lael = label.values.reshape(-1,1)
2.直接转换成array
label = np.array(label)label = label.reshape(-1,1)
如果觉得《pandas - AttributeError: Series object has no attribute reshape》对你有帮助,请点赞、收藏,并留下你的观点哦!