AnsweredAssumed Answered

What is wrong with my spatial.to_featureclass() syntax?

Question asked by MWilliams_BGCINC on Nov 8, 2019
Latest reply on Nov 12, 2019 by MWilliams_BGCINC

I am trying to use Pandas data frames to filter features as using the equivalent geoprocessing tools (select, append) take multiple hours to run. The script reads in my feature class just fine, but outputting to a new feature class produces the following error: 

ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

 

 

intersectionsSdf = pd.DataFrame.spatial.from_featureclass(intersections)

selection = intersectionsSdf.loc[intersectionsSdf[sc].isin(verifiedSites)]

selection.spatial.to_featureclass(r'MYPATH\MYGDB.gdb\VerifiedSelectionLayer', overwrite=True)

Note: 'verifiedSites' is just a list of integers- this seems to not be a problem as printing the dataframe works fine, but outputting to an FC fails

 

Can someone help me troubleshoot this? As far as I can tell it may be something to do with the ordering of my inputs? It ran one time with no errors, but I cannot reproduce this result

Outcomes