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!)
Best Answer
At least four things needed correction:
There are examples here.