I'm trying to use the DeleteIdentical_management tool within an update cursor. I'm pretty sure I'm going about this the wrong way, I'd like to see if someone could help. I'm relatively new to python, so bear with me. Here is my bit of code:
#Delete Identical Features based on Field Name and Rig Number field, not deleting field names with null values. FC = r'C:\Scripts\Drilling_Rig_Deduplication\Drilling_Rigs.gdb\MERGED_RIGS' cursor = arcpy.UpdateCursor(FC) for row in cursor: fieldValue = row.FIELD_NAME if row.FIELD_NAME is not None: arcpy.DeleteIdentical_management(FC, ["FIELD_NAME","RGNMBRCLC"]) else: print "nothing left to delete" del row, cursor print "dedup process done" print arcpy.GetMessages()
What I'd like to happen is for arcpy to ignore the rows where there is a NULL value in the FIELD_NAME field. Then have the delete_identical tool look through the rest of the rows and delete duplicate records. - Any ideas?