Handling Concat and Shift Feature in Pandas for Data Science [on hold]

I am trying to USE Lag features AND Concat() and Shift() function,
    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
But The 't-2', 't-1', 't' Coloumn names aren't showing up .
Can anyone say what's wrong in my code...

Комментарии

Популярные сообщения из этого блога

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target

TeXnicCenter does not work with Adobe anymore