Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FieldA FieldB
- 1 0
- 2 1
- 2 1
- 3 0
- with arcpy.da.UpdateCursor(featureClass, ("FieldA", "FieldB")) as cursor:
- for rupd in cursor:
- rows = [row for row in arcpy.SearchCursor(featureClass, 'FieldA=' + str(rupd[0]) )]
- if len(rows)>1:
- rupd[1]=0
- else:
- rupd[1]=1
- cursor.updateRow(rupd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement