I'm working through some da.UpdateCursor scripts to make updates to a fgdb. Although the script below works successfully as a rule, it returns the incorrect max value from one feature class.
The feature class in question has been rebuilt numerous times but I still get the second highest value returned not the highest. Note this occurs in this feature class on the three columns with values (OBJECTID, Shape_Length, Shape_Area), the only other column is Shape.
Can anyone provide some guidance please as I have researched this and can't get an answer after some hours of experimenting across numerous other feature classes.
My only thought at this point, 'is there a ceiling on max?' given that min(cursor) returns the lowest value correctly on the three columns.
Using Win 7, ArcGIS 10.2, Python 2.7.5 (yes, I'm in a mixed OS environment).
import arcpy, sys, os
from os import sep
ws = env.workspace
with arcpy.da.UpdateCursor(ws +sep+ 'Library_362', "Shape_Area") as cursor:
for row in cursor:
highValue = max(cursor)
print highValue
# returns [7693891.489877664]
# s/be [10054353.128549]