Forum

Author Topic: importReference from pandas dataframe rather than csv  (Read 2084 times)

spatialdigger

  • Newbie
  • *
  • Posts: 17
    • View Profile
importReference from pandas dataframe rather than csv
« on: August 17, 2021, 11:09:43 PM »
So, I can use importReference to get the coordinates from a csv file, however, I would rather bring it in directly from pandas without writing to csv first.

Here's my csv import code

Code: [Select]
chunk.importReference(path=TARGET_PATH, format=Metashape.ReferenceFormatCSV, columns='nxyz', delimiter=',', create_markers=True, skip_rows=1)
The pandas dataframe is a conventual one

Code: [Select]
  target_id     easting    northing  height
0  target 3  340065.045  158038.578  12.628
1  target 2  340065.429  158038.089  12.593
2  target 4  340066.198  158038.501  12.581
3  target 1  340065.495  158039.022  12.589

So how could I import this directly and skip the need to export to csv?