which is not what I want, since the values I am subtracting from year are already subtracted from these values.
A:
You can use iloc after setting your index to be your desired dates and groups.
In [241]: df.set_index('time', inplace=True)
Out[241]:
A B
time
2018-02-28 11:19:05.069613 0.8 1.0 0.6
2018-02-28 11:19:05.069613 0.8 1.1 0.6
2018-02-28 11:19:05.069613 0.8 1.2 0.6
2018-02-28 11:19:05.069613 0.8 1.3 0.6
2018-02-28 11:19:05.069613 0.8 1.4 0.6
2018-02-28 11:19:05.069613 0.8 1.5 0.6
2018-02-28 11:19:05.069613 0.8 1.6 0.6
2018-02-28 11:19:05.069613 0.8 1.7 0.6
2018-02-28 11:19:05.069613 0.8 1.8 0.6
2018-02-28 11:19:05.069613 0.8 1.9 0.6
2018-02-28 11:19:05.069613 0.8 2.0 0.6
2018-02-28 11:19:05.069613 0.8 2.1 0.6
2018-02-28 11:19:05.069613 0
Related links:
Comments