I'm new on python, and I'm trying to convert this code from another language. And I don't know if there is a simple way to solve my problem and avoid the long processing time.
About the problem
I have a data frame with 2 columns (time, for every 30 minutes; and a value) trying to find a maximum aggregate value from a specific time step for each day.
About the time, they are already an accumulation. For example, '2019-03-28 04:00:00', represents an accumulation from 03:31:00 to 04:00:00.
So, for a time step equals to 2 hours, for example, I may find the maximum value ranging from 04:00:00 to 05:30:00 (=80.0) at 2019-03-28, but it could happen in a different set of data.
Time Value
2019-03-28 00:30:00 10.0
2019-03-28 01:00:00 5.0
2019-03-28 01:30:00 0.0
2019-03-28 02:00:00 15.0
2019-03-28 02:30:00 2.0
2019-03-28 03:00:00 0.0
2019-03-28 03:30:00 0.0
2019-03-28 04:00:00 10.0 *
2019-03-28 04:30:00 0.0 *
2019-03-28 05:00:00 10.0 *
2019-03-28 05:30:00 60.0 *
2019-03-28 06:00:00 0.0
........
........
2019-03-28 23:30:00 0.0
........
........
EDIT Is there a simple way to automatically find the maximum value aggregating 2 hours for each day?