def Replace( field, find, replace ): if field != find: return field elif field == find: return replace
Replace( !RUseCode04!, "999", "9999")
import arcpy fc = r'C:\path\to_your\feature_class' fields = ['RUseCode02', 'RUseCode03', 'RUseCode04'] rows = arcpy.UpdateCursor(fc) for row in rows: for field in fields: if row.getValue(field) == '999': row.setValue(field, '9999') rows.updateRow(row) del row, rows
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.