bad operand type for unary -: 'str' error in geographiclib

248 Views Asked by At

I need to find out the Longitude and Latitude distance using geographiclib

It is giving this type error:

Error: bad operand type for unary -: 'str'

Geo = Geodesic.WGS84
for i in range(0, 2112):
    Lat1=df3['Lat'].iloc[i]
    Long1=df3['Long'].iloc[i]
    Lat2=df3['Lat'].iloc[i+1]
    Long2=df3['Long'].iloc[i+1]
    df3['dis'] = Geo.Inverse( Lat1, Long1, Lat2, Long2)
0

There are 0 best solutions below