X = ss_X.fit_transform(X)
y = ss_y.fit_transform(y.reshape(-1,1))
log_y = ss_y.fit_transform(log_y.reshape(-1,1))
错误提示:'Series' object has no attribute 'reshape'
需要把X,y,以及log_y标准化之后,保存为csv文件。
找到一些方法说使用DF["MEDV"].Values.reshape(-1,1)来解决,没问题y可以这样做。
但是,log_y = np.log1p(y),log_y在原来的csv文件中没有这一列。
我是想把log_y加进来,构成一个新的CSV文件输出,所以,没办法使用
DF["log_MEDV"].Values.reshape(-1,1)
有什么好的方法吗