I have the following data in geo.dat
geo.dat
id lon lat inhab name 1 9. 45. 100 Ciriè 2 10. 45. 60 Acquanegra
and I g
You can use np.lib.recfunctions:
np.lib.recfunctions
import numpy.lib.recfunctions as rfn data = rfn.append_fields(data, ['x', 'y'], [x, y])