Select to view content in your preferred language

GoeAccessor - "Address column not found in dataframe"

911
3
08-27-2020 12:55 PM
by Anonymous User
Not applicable

Hello everyone, 

I am using Python API (1.8.1) and ArcGIS Enterprise (10.7.1) for scripting and automation. I am creating spatially enabled data frames from both feature layer and feature class with GeoAccessor. The conversion is working well. However, when I am trying to use GeoAccessor.from_df(), I am receiving this error message "ValueError: Address column not found in dataframe". There is no column with the name of address in my both feature layer and feature class. I checked the documentation of ArcGIS API for Python. The address_column in GeoAccessor.from_df() is optional. I do not know how to solve this problem.

Thank you

0 Kudos
3 Replies
JoeBorgione
MVP Emeritus

This is just a shot in the dark, but what if you were to add that field name and see how it goes?  I'm finding with some of the latest technologies (the Arcgis API for Python included) that there are few bumps in the road ahead for as users.  That said, as we encounter them and let ESRI  know about them, they'll be able to respond and get them taken care of.

That should just about do it....
0 Kudos
LouieRodriguez
Occasional Contributor

Were you ever able to figure out how to use from_df()? There isn't much documentation on how to use it online and yours is the only post I can find mentioning it.

0 Kudos
Justin_Greco
Frequent Contributor

In the documentation it says it is optional and if you don’t specify it will look for a column named “address”.  This is only for geocoding a data frame on an address field.  Probably not the best name for that function in my opinion, from_address might be easier to understand.  Best way to get a data frame from a feature layer is to query it and set as_df=True.  To get it from a feature class use pd.DataFrame.from_featureclass()

0 Kudos