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.
-
Can you add a concrete example of want you want to do? For example using screenshotsBera– Bera2021年08月23日 07:59:59 +00:00Commented Aug 23, 2021 at 7:59
1 Answer 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.
Explore related questions
See similar questions with these tags.