I'm running a calculation that produces decimals while using the AM field calculator but results in integers while using python. Can you help?
The AM field calculator expression:
minutes = [length_mile] *60 / [speed_limit]
The python expression:
gp.calculatefield_management ("highway", "minutes", "!length_mile!*60/!minutes!","PYTHON")
The field to be calculated is added using gp.addfield_management:
gp.addfield_management (filename, "minutes", "double")
After my python code produced numbers rounded to the integer, I double-checked using the field calculator and the result included the decimals. I need the decimals.
Can anyone help with my programming oversight?
Thank you.
Janice Poehlman
Wisconsin DNR