I have a working formula that I can put in the Field Calculator which I'd like to use in my python code:
.3-.001*Log ( [Field1]+1 )-.02*Log ( [Field2]+1 )-.04*Log ( [Field3]+1 )
My code:
import math
expression =".3-.001*Log(!Field1!+1)-.02*Log(!Field2!+1)-.04*Log(!Field3!+1)"
arcpy.CalculateField_management("Layer","Field4",expression)
ExecuteError: ERROR 999999: Error executing function. Syntax error Failed to execute (CalculateField).
How can I write this expression?
expression =".3-.001*math.log(!Field1!+1)-.02*math.log(!Field2!+1)-.04*math.log(!Field3!+1)"