Код: Выделить всё
df= pd.read_excel('Dataset.xlsx')
df['Datetime']=pd.to_datetime(df['Date'])
df=df.set_index('Datetime')
Код: Выделить всё
Date SM Rain
01/01/2016 0.23 0
02/01/2016 - 0
03/01/2016 - 10
04/01/2016 0.15 0
05/01/2016 0.30 0.1
06/01/2016 - 0
07/01/2016 - 5.2
08/01/2016 - 12.3
05/01/2016 0.40 0.5
06/01/2016 - 0
07/01/2016 0.25 0
08/01/2016 - 0
.
.
.
Код: Выделить всё
Date SM Rain deltaSM Rsum
01/01/2016 0.23 0 - 0
02/01/2016 - 0 - -
03/01/2016 - 10 - -
04/01/2016 0.15 0 -0.08 10.0
05/01/2016 0.30 0.1 0.15 0.1
06/01/2016 - 0 - -
07/01/2016 - 5.2 - -
08/01/2016 - 12.3 - -
05/01/2016 0.40 0.5 0.10 18.0
06/01/2016 - 0 - -
07/01/2016 0.25 0 -0.15 0
08/01/2016 - 0 - -
Подробнее здесь: https://stackoverflow.com/questions/785 ... ndow-using