How can I speed up the execution of this line:
from geopy import distance
...
df['Km'] = df.apply((lambda row: distance.distance(row['coord_1'],row['coord_2']).km),axis=1)
where coord_1 and coord_2 are two large sets of coordinates.
distance.distance is a geopy function (https://github.com/geopy/geopy/blob/master/geopy/distance.py)
Thanking you up in advance.
--- Update: I found a Cython implementation of the Vincenty formula@ github.com/dmsul/cyvincenty.git. It greatly sped up the performance ---