Calculate Field but only the Null values

52
0
12-16-2019 06:42 AM
KarinBergbjørn
New Contributor

Im using the field calculator and wants to give a field (fare) a value by reclassifying another field (1000). However, I only want to reclassify where the value in field is Null and leave the other values as they are.

EXPRESSION

Fare= Reclass (!1000!)

Code block

def Reclass (arg):

if arg == 1:

   return None

elif arg == 2 and !Fare! is None:

   return 2

else 

return None

Tags (1)
0 Kudos
0 Replies