Dcamrine

nesting an arithmetic function within the reclass function!

Discussion created by Dcamrine on Sep 16, 2013
Latest reply on Jan 16, 2015 by Dcamrine
I have used the reclass function several times, but what I would like to know is how to add a line after the "return" that prints the value of field A + 90 instead of just "1" into the cell.

"Parser:
Python

Expression:
Reclass(!WELL_YIELD!)

Code Block:
def Reclass(WellYield):
    if (WellYield >= 0 and WellYield <= 10):
      return 1 Instead of "1" a Calculation of (Field A +90 or Field B -180) as an example.
    elif (WellYield > 10 and WellYield <= 20):
      return 2
    elif (WellYield > 20 and WellYield <= 30):
      return 3
    elif (WellYield > 30):
      return 4
"

Any help is much appreciated! i'm hoping it's something simple and i just don't know!

Outcomes