AnsweredAssumed Answered

Python Calculate Field If Statement

Question asked by rdg129 on Feb 14, 2011
Latest reply on Sep 9, 2014 by aommen-esristaff
Just wondering if the Python-Geoprocessing Community could help me.  I am trying to write the following code block into a calculate field called weight from the values in another field called Symbol.

def Reclass( !Weight!):
  if ( !SYMBOL! == 6):
    return 1.2
  elif ( !SYMBOL! == 85):
    return 1.5
  elif ( !SYMBOL! ==2):
    return 1
  elif ( !SYMBOL! ==42):
    return 1.8
  elif ( !SYMBOL! ==58):
    return 2

It just won't work.  help...

Attachments

Outcomes