my DF looks like this:
0 2021-01-01 01:00:00+ 00:00
1 2021-01-01 01:05:00+ 00:00
2 2021-01-01 01:10:00+ 00:00
3 2021-01-01 01:15:00+ 00:00
4 2021-01-04 06:00:00+ 00:00
5 2021-01-04 06:05:00+ 00:00
This column is a timestamp. I want to calculate a duration of each period (without gaps between rows bigger than 5 minutes), its beginning and ending. For example here, I want to get as a results:
- 15 minutes from 2021-01-01 01:00:00+ 00:00 till 2021-01-01 01:15:00+ 00:00
- 5 minutes from 2021-01-04 06:00:00+ 00:00 till 2021-01-04 06:05:00+ 00:00
How can I do this?