In this task I have a data frame with timestamp and a service message that is a request of some service, this column has multiple entries of same message in a short period of time because the message keeps on generating until service is accepted or rejected. here is sample dataframe -
timestamp service message
2019-02-15 15:56:19 battery check
2019-02-15 15:56:34 battery check
2019-02-15 15:57:02 battery check
2019-02-15 15:57:30 battery check
2019-02-15 15:57:54 battery check
2019-02-15 15:59:10 battery check
2019-02-15 17:05:03 battery check
2019-02-15 17:05:42 battery check
2019-02-15 17:06:40 no network available
2019-02-15 17:06:48 no network available
2019-02-15 17:06:58 no network available
2019-02-15 17:08:31 no network available
I want to remove all duplicates let's say in a 15 min time frame, so that can be counted as 1 service.
but simple string check not working since message at 17:05:03
is different from previous since there is more than an hour difference.
Is there a way to do this?
Thanks in advance.