我正在尝试使用滞后功能和 Concat() 和 Shift() 功能,
seies = Series.from_csv('sugar_price_2.csv', header=0, sep=';')
In [25]: prices = DataFrame(series.values)
In [26]: dataframe = concat([prices.shift(3), prices.shift(2), prices.shift(1), prices], axis=1)
In [27]: dataframe.coloumns = ['t-2', 't-1', 't', 't+1']
In [28]: print(dataframe.head(20))
0 0 0 0
0 NaN NaN NaN 2800
1 NaN NaN 2800.0 2800
2 NaN 2800.0 2800.0 2800
3 2800.0 2800.0 2800.0 2800
4 2800.0 2800.0 2800.0 2800
5 2800.0 2800.0 2800.0 2800
但是 't-2', 't-1', 't' 列名没有出现。
谁能说出我的代码有什么问题...