如图,在进行reshape操作时,由于采用了pandas,pandas的Series没有reshape而报错
解决方法:
用values方法将Series对象转化成numpy的ndarray,再用ndarray的reshape方法.
StandardScaler().fit_transform(data[‘Amount’].values.reshape(-1, 1))
Series object has no attribute reshape解决方法
最新推荐文章于 2023-11-22 10:50:48 发布