1

I am updating mismatched data across two systems and have an Excel sheet that combines a consolidated data set. Unfortunately I do not have a reliable join field to relate this back to my GIS data.

I have brought in the corrected data as a Pandas DataFrame and was hoping to iterate through each feature in my GIS layer. If there was a join attribute I would then update the fields in the GIS as required. However if there was not a join on the field (e.g. the field was empty, didn't match, or was duplicated) then I wanted to create a list of records I could then interrogate further.

Is there an ArcPy method to select a layer and then iterate through each feature and then each field. I am relatively new to ArcPy and think I am looking up the wrong terms.

Taras
35.7k5 gold badges77 silver badges151 bronze badges
asked Aug 23, 2021 at 6:37
1
  • Can you add a concrete example of want you want to do? For example using screenshots Commented Aug 23, 2021 at 7:59

1 Answer 1

1

Yes, da.SearchCursor

SearchCursor establishes read-only access to the records returned from a feature class or table.

It returns an iterator of tuples. The order of values in the tuple matches the order of fields specified by the field_names argument.

And da.UpdateCursor if you want to update/change values.

answered Aug 23, 2021 at 7:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.