Thank you - that worked, so it did replace the Null values - but it also then replaced all the other values as well that were already in there from before! Is there something about the way I have ended the script that caused it? This is the updated version of the script I used:
#DescGroup update
firstupdate(!DescGroup!, !DescTerm!)
def firstupdate(DescGroup, DescTerm):
if (DescGroup in ['Inland Water', 'Tidal Water']) and (DescTerm in '', " ", None):
return 'Water' #Needs to be string
elif (DescGroup in ['Building' , 'Structure' , 'Glasshouse']) and (DescTerm in '', " ", None):
return 'Structure' #all fields in DescGroup with Building / Structure / Glasshouse in catagorised as Building
elif (DescGroup in ['Road' , 'Track' , 'Path', 'Rail' , 'Roadside']) and (DescTerm in '', " ", None):
return 'Track'
elif (DescTerm in '', " ", None):
return 'Landform' #if blank and dont fit any other catagory
else:
return DescTerm # if not blank
Also can you make python recognise text within a string so that 'Road' and 'Road; Path' are both relabelled Track without having to go through all the different catagories? I have many catagories like this that need to be lumped together and I thought that python would recognise just the letters in the string rather than the whole string having to match? Thank you!