Reputation: 401
Currently I have a csv file like this:
11:00 p.m.
11:00 p.m.
03:00 p.m.
03:00 p.m.
05:00 a.m.
05:00 a.m.
07:00 a.m.
12:00 p.m.
07:00 a.m.
05:00 a.m.
I want to delete the duplicates that are in sequential rows so the output will be this:
11:00 p.m.
03:00 p.m.
05:00 a.m.
07:00 a.m.
12:00 p.m.
07:00 a.m.
05:00 a.m.
I do not want to delete all duplicates, just duplicates that are in sequential rows, for example if the 4th and 5th row match, delete one of the duplicate rows. Is there an easy way to do this without having to run a for-loop?
Upvotes: 1
Views: 90