AnsweredAssumed Answered

Rounding issues using Python in ArcGIS Pro

Question asked by MidnightYell2003 Champion on Feb 5, 2018
Latest reply on Feb 6, 2018 by Dan_Patterson

It seems to me that ArcGIS Pro is not rounding my numbers correctly when I use Python in Calculate Field. Or my expression is incorrect.

 

Here is my example:

The Shape_Area of a feature is 7464.72748

My Calculate Field expression is

str(int(round(round(!Shape_Area!), -1)))

I would think this should result in a string value of 7470, but it gave me 7460.

 

Where am I going wrong? Shouldn't round(7464.72748) give me 7465 more or less?

And then round(7465, -1) give me 7470?

Outcomes