I have a dataframe which looks like this:
ID Date Type Time
1 02.12.2021 Car 12:23
1 02.12.2021 Car 12:25
1 02.12.2021 Car 12:27
2 02.12.2021 Train 23:40
2 02.12.2021 Train 23:56
2 02.12.2021 Train 00:20
2 02.12.2021 Train 00:40
4 02.12.2021 Car 04:20
4 02.12.2021 Car 04:25
4 02.12.2021 Car 04:30
I want change the date for those rows which have the same "ID" and "Type". So if the time of next row passes 23:59 and has same ID and Type like the row before, the date should change for the next rows. It should be something like this:
ID Date Type Time
1 02.12.2021 Car 12:23
1 02.12.2021 Car 12:25
1 02.12.2021 Car 12:27
2 02.12.2021 Train 23:40
2 02.12.2021 Train 23:56
2 03.12.2021 Train 00:20
2 03.12.2021 Train 00:40
4 03.12.2021 Car 04:20
4 03.12.2021 Car 04:25
4 03.12.2021 Car 04:30
Any help will be appreciated. Many thanks