In ArcGIS 10.5, I am building a model that should convert a field of coded values to another code. This seems like it should be a simple if/then statement but I am not getting it. To simplify the process, I populated the target field with the source field's values and then intend on using python to transpose the values. It should be considered a string, but the values are numerical. The field I am trying to edit is "TP_Condi"
In the "Calculate Field" code block:
def reclass: if TP_Condi = 3: return 1 elif TP_Condi = 2: return 8 elif TP_Condi = 1: return 3 else: return "error"
This is the code I was seeking: