title: Calculating distance between *multiple* sets of geo coordinates in python
body: <p>I am struggling to calculate the distance between <em>multiple</em> sets of latitude and longitude coordinates.  In, short, I have found numerous tutorials that either use math or geopy.  These tutorials work great when I just want to find the distance between ONE set of coordindates (or two unique locations).  However, my objective is to scan a data set that has 400k combinations of origin and destination coordinates.  One example of the code I have used is listed below, but it seems I am getting errors when my arrays are > 1 record.  Any helpful tips would be much appreciated.  Thank you.</p>
  
  <pre><code># starting dataframe is df
  
  lat1 = df.lat1.as_matrix()
  long1 = df.long1.as_matrix()
  lat2 = df.lat2.as_matrix()
  long2 = df.df_long2.as_matrix()
  
  from geopy.distance import vincenty
  point1 = (lat1, long1)
  point2 = (lat2, long2)
  print(vincenty(point1, point2).miles)
  </code></pre>