I am looking for a way to separate my Pandas dataframe into smaller increments. For some context I am making an ISS observer app, which aims to predict when there will be passes overhead of a person's input location.
Long story short, I have a dataframe with lat/lon coords for the ISS for a certain point in time. The coords are for each second that the ISS is within a 500km radius (from the observer location) hence for a certain diameter of 500km there will be multiple seconds of lat/lon coordinates.
Problem is that the ISS will make multiple trips around the observer within 3 days (period of lookahead), hence I need to be able to separate one encounter from another.
For example this is the first encounter:

So we start with 39613 seconds passed and (46.0405, 23.049) ISS cords. Scrolling further to the right we end with 39673 seconds passed and (47.6867, 27.924) ISS cords - so this is where the encounter ends.
What I want is to separate it from the next encounter somehow as shown here:

This should be possible somehow, but I have not studied nor seen how to do this. Also, I would like to clear out anything in between the start and end points as I need only actually the difference between start and end seconds and their lat/lon values.
A workaround for this that I have come up so far is to somehow change my while loop which collects the data. But I am not sure how to incorporate this as well. This seems like the better solution as this way I will have collected less data and hence the whole app should be faster.
I have not yet tried a workaround in the while loop or in the dataframe as I have no idea how to separate each sequence of seconds from the other. How would I mark the start and end? They are all in ascending order so I think that is the starting point. Perhaps some sort of if statement within the loop will facilitate what I aim to do or a slice in the df itself.
The end aim of all of this is to have a starting lat/lon/seconds_passed of the ISS relative to the observer and an ending lat/lon/seconds passed. Marking a start and an end to the observation where it will show how many seconds the observation will last and where the start and end points are (the rest in between I can use for a vector within the start/end).
Thank you for any input on this.