I have a point shapefile with Name, address etc in the attribute field. I want to delete all the duplicate records from the attribute table with the same name. For example I have a 10 records that have SMITH in the name field. How can I remove/delete records to just list 1 record for SMITH. Can soactual meone suggest a better way than just sorting the data and doing it manually as there are thousands of records. Is there a tool or a selection method that will work or a script/python code I code easily apply to perform this task?
rows = arcpy.UpdateCursor('10MileQ3')fields = arcpy.ListFields('10MileQ3')myList = []for row in rows:~~for field in fields:~~~~if field.name == 'COMPID':~~~~~~value = row.getValue(field.name)~~~~~~if value in myList:~~~~~~~~rows.deleteRow(row)~~~~~~if value not in myList:~~~~~~~~myList.append(value)
... I discovered that not all of the records with the same shape are being deleted. ....
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.