Coordinates from UTM to Latitude and Longitude in pandas

Viewed 2142

I have a DataFrame with the following result: enter image description here

and I want to convert those coordinate columns from WGS84 to Lon & Lat and finally add those new columns in my data frame:

For conversion I am using the following code, but I think there should a better way without converting the coordinate columns to list and create a new one DataFrame.

import pyproj as pp
from mpl_toolkits.basemap import Basemap
import pandas as pd

cx =dfb.COORDENADA_X.tolist()
cy =dfb.COORDENADA_Y.tolist()

utm15_wgs84 = pp.Proj(init='epsg:32615')

for ix, iy in zip(cx, cy):
    lon, lat = utm15_wgs84(ix, iy, inverse=True)
    print(lon, lat)

Any suggestion for doing this?

1 Answers
Related