2

There are many solutions to iterate over (Geo)DataFrame row pairs (see Pandas iterate over DataFrame row pairs for example) 1) by iteration for (indx1,row1),(indx2,row2) in zip(data_gpd[:-1].iterrows(),data_gpd[1:].iterrows()): print(indx1, indx2, row1['geometry'].distance(row2['geometry'])) 0 1 83538.37731261192 1 2 119611.60785001986 2 3 27537....


Only top voted, non community-wiki answers of a minimum length are eligible