I am having an issue saving a pandas data frame as a table in the active ArcGIS Pro workspace.
I have converted the entire data frame to string data types using the following line of code:
import pandas
df = df.applymap(str)
When I run the to_table geoprocessing tool, with the following line of code, I receive this error:
import arcpy
import arcpy.sa import *
df.spatial.to_table(location="tbl_name")
TypeError: 'field_names' must be string or non empty sequence of strings
I have attached a csv file of the data frame for reference.
The first field is missing a field name in the first row.
Does the index need a field name? I'm not seeing the index show up as a column when running the dtypes argument.
you posted a csv and the error is complaining about a missing name, perhaps you have to provide the field names somewhere
I am having the exact same issue. What is interesting for me, is that this worked perfectly in Pro until I just upgraded to 3.2.0
Previous to upgrading my pro version, it worked...now I get the same TypeError. Have you had any luck?