this seems like it should be easy but I am new to python and am having trouble... I have four columns. I would like perform a field calculation that sums the values by row for three of the columns and inserts that sum into the associated row of the 4th column. In vb script is it very straight forward. I would like to know how to do it in python. ie.
Col1 Col2 Col3 Col4(SummedValues)
1 3 1 5
2 1 1 4
I have tried adding a for
statement (for rows in !resuly!:
)
but it returns a parsing syntax error (Error 000989 Python Syntax Error: Parsing error Syntax Error: invalid syntax (line 2)
).
I am in ArcMap V.10.4
I feel like it is an iteration issue- maybe I need to tell it to go through each row i just don't know how to do that correctly in the field calculator...
Per Phillip and JR comments: Code updated to and it worked perfectly.
x
-parameter at all, as you´re returning the sum anyway.