I have a Pandas dataframe with many columns. Two of then are timestamp (start and end).
start end value string
2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 17:00:00 2021-12-01 17:30:00 2 b
2021-12-01 14:00:00 2021-12-01 16:00:00 3 c
I need to standardize a timestamp marker (column time below) from 5 to 5 minutes repeting the values from the other columns value and string that belongs to the same time interval, like this:
time start end value string
2021-12-01 14:00:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 14:05:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 14:10:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 14:15:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 14:20:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 14:25:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 14:30:00 2021-12-01 14:00:00 2021-12-01 14:35:00 1 a
2021-12-01 17:00:00 2021-12-01 17:00:00 2021-12-01 17:30:00 2 b
2021-12-01 17:05:00 2021-12-01 17:00:00 2021-12-01 17:30:00 2 b
....
There are many intersections on time intervals, so I woldn't be able to use df.resample with DatetimeIndex.