This question is directed at the ArcGIS API for Python staff participating in GeoNet.
I am trying to determine whether there is a software or code bug with import data - arcgis.gis module — arcgis 1.3.0 documentation. According to the documentation, import_data works with a Pandas dataframe and can load a Pandas dataframe spatially if address_fields are present.
While helping troubleshoot UnboundLocalError: local variable 'fc_layer_definition' referenced before assignment, I came to find that including "x" and "y" fields in a Pandas dataframe is supported, and that points will be automatically created without adding any additional arguments. Attempting to generate a spatial dataframe similarly, spf = arcgis.features.SpatialDataFrame.from_df(df), generates an error and says no address fields are present.
So, is import_data supposed to support adding Pandas dataframes with "x" and "y" columns or not? If yes, where is that documented?
I can only find .import_data with respect to geocoding on github
https://github.com/Esri/arcgis-python-api/search?utf8=%E2%9C%93&q=import_data&type=
and in the docs
Can you please add an example CSV that you are trying to use?
Also, can you post your code as well?
Thanks
I took the screenshot of data from https://community.esri.com/thread/207898-unboundlocalerror-local-variable-fclayerdefinition-referenc... and uploaded it as a CSV after renaming long,lat columns to x,y.