I am trying to define a field in a Polygon attribute table (UHI2020) using data from another field, ppkm2. The python box reads as follows:
def reclass(UHI2020):
if (ppkm2 <= 100):
return 1
elif (ppkm2 > 100 and ppkm2 <= 2700):
return 2
elif (X1 > 2700):
return 3
What have I done wrong? I run it and the content of UHI2020 does not change.
reclass(!UHI2020!) # expression with python parser note ! mars
def reclass(ppkm2):
if (ppkm2 <= 100):
return 1
elif (ppkm2 > 100 and ppkm2 <= 2700):
return 2
elif (ppkm2 > 2700):
return 3
try the expression and the code box in the above