I have tried all of below snippets to use Python Parser in Field Calculator and update the values of a field called type
based on a filed called MamerMN
but in all of them I am getting Syntax error in Geoprocessing result window!
if !MamerMN! <= 0.151560:
return 1
and
if (!MamerMN! <= 0.151560):
return 1
and
if (MamerMN <= 0.151560):
return 1
and
def(MamerMN)
if MamerMN <= 0.151560:
return 1
and
def(MamerMN)
if (MamerMN <= 0.151560):
return 1
Can you please let me know what I am doing wrong?
Update
def foo(MamerMN):
if MamerMN <= 0.151560:
return 1
def foo(bar): return bar**bar
foo(!MamerMN!)