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

相关文章:

  • 2021-08-08
  • 2022-12-23
  • 2021-10-24
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
猜你喜欢
  • 2021-10-26
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案