So I am trying to reclassify a text string by searching for bits of strings and converting those strings to an integer value in a new field within the field calculator. e.g. I want to find all values in the field "text" that contain the word "cover" in them, for example, "Other deciduous trees with 11- 25% impervious cover". I then want to take that and assign an integer value to a new field "class". I tried to write the script (shown below), but no dice so far, anyone have any insight?
def reclass(C_TEXT): if "cover" in C_TEXT: return 10