... I discovered that not all of the records with the same shape are being deleted. ....
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 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?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.