I am calculating buffer widths based on the ages of polygons. The buffer widths are stored in a new column in the attribute table. The code is:
with arcpy.da.UpdateCursor(hf,["FEATURE","YEAR","BUff"]) as cursor:
for row in cursor:
f_type = row[0]
year = row[1]
buff = row[2]
if f_type == "GRASSLAND":
age = 2012 - int(year)
if age > 60:
buff = 0
cursor.updateRow(row)
if age <=60:
buff = (10 * age) / 50
cursor.updateRow(row)
Why is this code not successfully editing the attribute table?