4

This is how I would do it import pandas as pd import geopandas as gpd df = pd.DataFrame() df['lat'] = [42, 42.1, 43, 43.2, 43.9] df['lon'] = [-120, -119, -118.2, -118, -117.2] gdf = gpd.GeoDataFrame(geometry=gpd.points_from_xy(df.lon, df.lat), crs="EPSG:4326").to_crs("EPSG:6340") df['distance_from_previous'] = gdf....


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