I am trying to replace values in a single column using an else if statement, but I keep getting an Syntax error in line 2. I'm new to Python so it's probably an easy solution, but I haven't been able to figure it out. I am using ArcMap 10.1.
def Replace(SrcLevel):
if SrcLevel == 0:
return "4-Other"
elif SrcLevel == 1:
retun "1-Primary"
elif SrcLevel == 2:
return "2-Middle"
SrcLevel = Replace(!SrcLevel!)
passin it will set all values to null. If you don't want this I would probably return the orginal field value in a finalelsestatement. – blah238 Feb 2 at 1:25