I am trying to l create a python script that will be a substitute to the find identical tool. I ran it last night on a large dataset, and it is taking 10+ hours to run. I believe I can run a search cursor and update cursor that will be light years ahead in performance. So far, I have gotten this far with my script:import arcpy from arcpy import env env.workspace = r"C:\Users\cc1\Desktop\NEW.gdb\WAYNE" table = "WAYNE" list = [] with arcpy.da.SearchCursor(table, ["FULL_ADDRESS_NAME"]) as cursor: for row in cursor: list.append(row[0]) del row, cursor with arcpy.da.UpdateCursor(table, ["FULL_ADDRESS_NAME","FEAT_SEQ"]) as updateRows: for updateRow in updateRows: nameValue = updateRow[0] if nameValue in list: updateRow[1] = lutDict[nameValue] updateRows.updateRow(updateRow) del updateRow, updateRows
To be specific for what I am doing, I need to search through a field (that had duplicate values) and return a new value that is a unique number for all the different set of duplicates. For example:search ID new Unique IDaaa 1aaa 1bbb 2ccc 3ccc 3aaa 1ddd 4So there would be an increment, but based if the number on the field of search ID is unique, and each successive value that is the same search ID would have the same value. Any thoughts on how to accomplish this? Thanks in advance!!