1

I am trying to output ONLY the Name Field in sdf using ArcGIS Python API and Notebook like thia

query = layer.query(where="POP2010 > 1000000", out_fields='NAME')
query.sdf

But I am getting the FID, and SHAPE too!

enter image description here

Why is this happening and how I can fix this to only get the Name?

0

1 Answer 1

1

Yes, that is expected behaviour for an SeDF, it must have id and geometry fields and the examples in the documentation show this.

Just turn it into a regular pandas dataframe:

pd.DataFrame(sdf["NAME"]) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.