I'd like some help with a task. I'm a Python begginer and I'm trying to calculate the distance between sequential items. For ex. item1 to item2 then item2 to item3 and so on.
There's only one problem, in my dataframe I must partition these calculations to the field ZCGUNLEIT as it indicates a route. So any ZCGUNLEIT will have ~300 coodinates, and I must know the distance between these 300 coodinates and then move on to the next ZCGUNLEIT.
I tried haversine library but couldn't understand how to integrate that to my dataframe.
If anyone can shed some light here, it will be appreciated.
OBS: This dataframe has millions of rows.