I'm trying to reclass values in field calculator using Python.
I want any value >= '5' to remain the same (return same value). Anything else to be = '0'.
Yes, DIST_EDGE are numbers.
I'm getting an invalid syntax error in Line 1 (see below)
Here's what I came up with (new script following comments):
Error Message:
Best Answer
Assuming the data type for DIST_EDGE is numeric, the function should be (note, no quotes):
However, if DIST_EDGE is a string data type, you must cast it to a number before making your comparison: