I have been trying to get Update Cursor to update a field in my attribute tale.
import arcpy fields = ['STATE_ABBR','Last_Update'] fc = "C:\Users\sword\Desktop\GIS Web Course\PersonalProject\GIS_Project.gdb\USAStates" with arcpy.da.UpdateCursor(fc, fields) as cursor: for row in cursor: if row == 'HI': row = '1' cursor.updateRow(row)
One Row has state abbreviations and the row Last_Update is blank, I just want to place a one in that row. I enter it in the Python box in ArcGis, it throw no errors but simply does nothing. The row doesn't update. The Last_Update column is a string field, and I have verified the path name in fc. What am I doing wrong? This is almost a copy from ESRI webite of the format.