I have a problem solving the following question:
the values start and end are repeated in every other rows. I would like to mark them with a unique number, that increases every time a new start value is reached.
I also want rows where the obj column is empty and not inbetween a start and an end, to remain empty in the ID column.
Thanks a lot in advance!

There might be a more streamlined way, but you can use
cumsum()with some logic.