I'm wanting to create a field with a maximum of 1 decimal place and then calculate a value into it: (I know that all my values are < 10)
arcpy.AddField_management('C:/shapefile.shp', 'myField', "FLOAT", 2, 1, "", "", "", "NON_REQUIRED", "")
arcpy.CalculateField_management('C:/shapefile.shp', 'myField', "[MEAN]", "VB", "")
It seems that no matter what I try I can't get the number of decimal places I want - I get the full value from the field I'm calculating from : [0.888889] and when I view the field properties I just see 0 for precision and 0 for scale. The data context is ESRI shapefile. And altering the numeric settings in the field properties is not an option.
Anyone have any ideas?
No comments:
Post a Comment