I have a dataframe including route coordinates and timestamp per random time intervals (from 1 to 50 seconds) as shown in this dataframe sample. I am looking for a way to trim the dataset in a way to keep only time differences greater then or equal to 30 seconds.
For example if the time stamp by index is like the following:
- [0] 2017-03-27 06:52:30
- [1] 2017-03-27 06:52:32
- [2] 2017-03-27 06:52:45
- [3] 2017-03-27 06:52:59
- [4] 2017-03-27 06:53:02
- [5] 2017-03-27 06:53:32
- [...] ......
Idealy I would like to keep only:
- [0] 2017-03-27 06:52:30
- [4] 2017-03-27 06:53:02
- [5] 2017-03-27 06:53:32
- [...] ......
Event a hint would be helpful!
Thank you!