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 withimport data - arcgis.gis module — arcgis 1.3.0 documentation. According to the documentation,import_dataworks with a Pandas dataframe and can load a Pandas dataframe spatially ifaddress_fieldsare present.
While helping troubleshootUnboundLocalError: 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.
那么,import_datasupposed 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?
一个lso, can you post your code as well?
Thanks
I took the screenshot of data from//www.gobook3.com/thread/207898-unboundlocalerror-local-variable-fclayerdefinition-referenc...and uploaded it as a CSV after renaming long,lat columns to x,y.