.from_layer Converting feature service table to pandas dataframe.

05-12-2020 10:15 AM
New Contributor III

The conversion of a table to a pandas spatial data-frame recently stopped working for us. Was there a change to the API recently? Is there a limit on the number of records this function can process? Other datasets of ours are working fine with the same code. Here is what we are trying:

feature_layers = gis.content.get('xxxxxxxxxxxxxxxxxxxxxxxxxxxxx')

data = pd.DataFrame.spatial.from_layer(feature_layers.tables[0])

0 Kudos
2 Replies
MVP Esteemed Contributor

stopped working for us

It helps to elaborate.  Are you getting an error or unexpected results?  If you are getting an error, what is the error?  If unexpected results, what are those?

0 Kudos
New Contributor III

It's the same for me. The mistake I get is: 

"Could not load the dataset: 'PropertyMap' instance has no attribute 'drawingInfo' "

I'm trying to pass a table instead of a layer, with layers it works but I need to read a table

item = gis.content.get("xxxxxxxxxxx")
foto = (item.tables)[1]
field_service_dataframe = pd.DataFrame.spatial.from_layer(foto)‍‍‍‍‍‍

Any ideas? Thanks

0 Kudos