i have a day dataframe below. i wanna select 3 hour consecutive values 4 times from 06:00 by increasing 15min.(using for loop) i tried using datetime.time(h,m,s) but don't know how to select after 3hours datetime setting. and still not good to using datetime & timedelta ..
date time
2018-01-26 00:00:00 -9.64
00:15:00 -10.08
00:30:00 -8.87
00:45:00 -9.91
01:00:00 -9.91
01:15:00 -9.93
01:30:00 -9.55
01:45:00 -9.51
02:00:00 -9.75
02:15:00 -9.44
02:30:00 -9.62
02:45:00 -9.39
03:00:00 -9.39
03:15:00 -10.90
03:30:00 -10.21
03:45:00 -9.28
04:00:00 -9.96
04:15:00 -10.19
04:30:00 -10.20
04:45:00 -9.85
05:00:00 -10.33
05:15:00 -10.18
05:30:00 -10.81
05:45:00 -10.51
06:00:00 -10.41
06:15:00 -10.49
06:30:00 -10.13
06:45:00 -10.36
07:00:00 -10.71
07:15:00 -12.11
07:30:00 -10.76
07:45:00 -10.76
08:00:00 -11.63
08:15:00 -11.18
08:30:00 -10.49
08:45:00 -11.18
09:00:00 -10.67
09:15:00 -10.60
09:30:00 -10.36
09:45:00 -9.39
10:00:00 -9.77
10:15:00 -9.54
10:30:00 -8.99
10:45:00 -9.01
11:00:00 -10.01
Name: out_temp, dtype: float64
the results should be like this
for loop 1
date time
2018-01-26 06:00:00 -10.41
06:15:00 -10.49
06:30:00 -10.13
06:45:00 -10.36
07:00:00 -10.71
07:15:00 -12.11
07:30:00 -10.76
07:45:00 -10.76
08:00:00 -11.63
08:15:00 -11.18
08:30:00 -10.49
08:45:00 -11.18
09:00:00 -10.67
Name: out_temp, dtype: float64
for loop2
date time
2018-01-26 06:15:00 -10.49
06:30:00 -10.13
06:45:00 -10.36
07:00:00 -10.71
07:15:00 -12.11
07:30:00 -10.76
07:45:00 -10.76
08:00:00 -11.63
08:15:00 -11.18
08:30:00 -10.49
08:45:00 -11.18
09:00:00 -10.67
09:15:00 -10.60
Name: out_temp, dtype: float64
... for loop4
how can i do it?