I'm using ModelBuilder to create a new field ([cat]) that will contain category values based on range criteria of another field ([yield]). I would like to use the Python parser. HEre is what I have so far in the Pre-Logic Script Code:
def Reclass(yield) :
if (yield <=140) :
return "Low"
elif (yield > 140 and yield <= 180) :
return "Average"
elif (yield > 180) :
In the expression block I have cat = Reclass(!cat!)I get a red "X" in the calculate Field dialog stating there is a parse error on line 1. Any ideas as to what I'm doing wrong?Thanks,