Lon_X Lat_Y
5,234234 6,3234234
5,234234 6,3234234
5,234234 6,3234234
5,234234 6,3234234
5,234234 6,3234234
I've GPS coordinates in a pandas/dataframe like above. These however use the comma separator. What's the best way using pandas to convert these to float GPS coordinates?
for item in frame.Lon_X:
float(item.replace(",", ".")) # makes the conversion but does not store it back
I've tried the iteritems function, but seems very slow and gives me a warning that I don't really understand:
for index, value in frame.Lon_X.iteritems():
frame.Lon_X[index] = float(value.replace(",", "."))
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy from ipykernel import kernelapp as app
