AnsweredAssumed Answered

Reclass null values in text field using Calculate Field

Question asked by data.officer on Dec 5, 2017
Latest reply on Dec 6, 2017 by data.officer

I have a text field called 'Description' that contains some <Null> values that I wish to update to 'Hedgerows' while keeping all other values the same.


Using Calculate Field in Pro, I tried the following:



Reclass (!Description!)


Code block

def Reclass(Description):

if (IsNull)

return Hedgerows


The expression was successfully verified but I then got the following error message when running the tool:


Error 00539: Error running expression: Reclass (u"Buildings")

Traceback (most recent call last):

File "<expression>", line 1, in <module>

File "<string>, line 2, in Reclass

Name Error: name 'IsNull' is not defined

Failed to execute (CalculateField).


Any suggestions? I'm a complete novice when it comes to Python.