I have a DataFrame containing events like this:
location start_time end_time some_value1 some_value2
LECP 00:00 01:30 25 nice info
LECP 02:00 04:00 10 other info
LECS 02:00 03:00 5 lorem
LIPM 02:55 03:15 9 ipsum
and I want to split the rows so that I get maximum intervals of 1 hour, e.g. if an event has a duration of 01:30, I want to get a row of length 01:00 and another of 00:30. If an event has a length of 02:30, I want to get three rows. And if an event has a duration of an hour or less, it should just remain being one row. Like so:
location start_time end_time some_value1 some_value2
LECP 00:00 01:00 25 nice info
LECP 01:00 01:30 25 nice info
LECP 02:00 03:00 10 other info
LECP 03:00 04:00 10 other info
LECS 02:00 03:00 5 lorem
LIPM 02:55 03:15 9 ipsum
It does not matter if the remainder is at the beginning or the end. It even would not matter if the duration is distributed equally to the rows, as long as no rows has a duration of > 1 hour.
What I tried: - reading through Time Series / Date functionality and not understanding anything - searching StackOverflow.