I am trying to write a script that finds difference but every time I use the information from instructor, I am getting an error, and getting nowhere...
table: field one is: Area_name, field two is 1990 POP, field 3 is pope 2000, and field four is pop 2010...
using ArcCatalog, I created a database located at C:/EsriPress/Script_4/US_County.gbd
broken script:
import arcpy
arcpy.env.workspace="C:/EsriPress/Scripting_4/US_County.gbd"
arcpy.env.overwriteOutput = True
fc = "US_County"# database
with arcpy.da.UpdateCursor(fc, ["Area_Name", "Resident_Population_1990", "Resident_Population_2010",
"SHAPE@Resident_Population_2010", "SHAPE@Resident_Population_1990"]) as cursor:
for row in cursor:
Area_Name= row[0]
x=row[1]
y=row[3]
row[4]=x
row[5]=y
cursor.updateRow(row)
del cursor
Can someone help?