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