import arcpy import sys in_table = sys.argv[1] field = sys.argv[2] val_dict = {} cur = arcpy.UpdateCursor(in_table) for row in cur: value = row.getValue(field) if value not in val_dict.keys(): val_dict[value] = 0 else: val_dict[value] += 1 row.setValue(field, value + '_' + str(val_dict[value])) cur.updateRow(row) del cur
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.