theitems = [] rows = arcpy.SearchCursor(inlayer) for row in rows: theitems.append(row.getValue(somefieldname)) del rows theitems.sort() min = theitems[0] max = theitems[-1]
myField = "MY_FIELD" minValue = arcpy.SearchCursor(inlayer, "", "", "", myField + " A").next().getValue(myField) #Get 1st row in ascending cursor sort maxValue = arcpy.SearchCursor(inlayer, "", "", "", myField + " D").next().getValue(myField) #Get 1st row in descending cursor sort
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.