After upgrading to ArcGIS API for Python 1.9.0 I can no longer use a Result object to create Spatial Dataframe.
*Apologies for not formatting the code as code. I'm not sure where that option went
Example code:
import arcpy
import pandas as pd
from arcgis.features import Feature
result_object = arcpy.Intersect_analysis([valid_input1, valid_input2], r'in_memory\output')
df = pd.DataFrame.spatial.from_featureclass(result_object)
Error message:
ValueError: filename must be a `str`, `Path`, or `PurePath`, not <class 'arcpy.arcobjects.arcobjects.Result'>
The workaround is to use:
df = pd.DataFrame.spatial.from_featureclass(r'in_memory\output')
instead of the Result object variable, but now I have to change my code
Code formatting ... the Community Version - Esri Community for future reference
It looks like the elipsis is gone now
Works for me. Edge browser on a laptop.
They still haven't got around to putting the code formatting symbol on the main line yet.
I'm on chrome. No code formatting option
I'd love to know the rationale behind this change, this seems like a step backward?
Why is this flagged as the solution?
I have no idea, I thought you were being cheeky. As the OP you should have control to set what is the accepted solution.
Fixed