Series object has no attribute reshape解决方法

如图,在进行reshape操作时,由于采用了pandas,pandas的Series没有reshape而报错
在这里插入图片描述
解决方法:
用values方法将Series对象转化成numpy的ndarray,再用ndarray的reshape方法.
StandardScaler().fit_transform(data[‘Amount’].values.reshape(-1, 1))