Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Python and Field Calculator

$
0
0
I am trying to run the following Python script through Field Calculator

Parser:
Python

Expression:
calctemp(!Value!)

Code Block

def calctemp(newValue):

if newValue > 0:
tempF = (newValue - 273.15)* 1.8000 + 32.00
return tempF

I get a syntax error invalid syntax(<expression>, line 1)

Any suggestions

Viewing all articles
Browse latest Browse all 2485

Trending Articles