Hello,
I am trying to convert a FeatureLayer object into a SpatialDataFrame object but am running into a strange error:
NameError: name 'OLD_PANDAS' is not defined
Any ideas what is wrong or how I can fix this?
I have imported the requisite packages I believe;
Many thanks
Solved! Go to Solution.
That makes sense. Generally, I would recommend sticking to one or the other. It can be really difficult to get them to play nice.
Try downgrading to pandas version "0.23.4" (I'm not sure on the exact version where it breaks, but this worked for me). There was a change in a pandas module that the ArcGIS API for Python is not accounting for yet.
I had the exact same problem with the data frame conversion and downgrading to pandas 0.23.4 worked! Thank you.
I downgraded to 0.23.4, but it did not solve the problem. pandas.DataFrame.spatial does not seem to have a method .from_layer, at least not according to tab-complete. (using arcgis 1.6)
for ArcGIS Pro 2.3.1 installed today, ArcGIS and pandas are listed below
(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda list
# packages in environment at C:\arc_pro\bin\Python\envs\arcgispro-py3:
#
...
arcgis 1.5.3 py36h66efe7d_1 esri
arcgispro 2.3 h35c310c_0 esri
...
pandas 0.24.1 py36ha925a31_