I would like to have all the records in a table given a rank value based on the values in another field. The caveat is that there are tied rankings. For example in the attached screen cap, EPDO is the data to rank, and RANK_EPDO is field to store the rank. Anyone aware of any tools in ArcGIS that will accomplish this?
The following python code works if the table is permanently sorted first w/ the Sort Tool.
# Codeblock: rank = 0 lastValue = None def getNextRank(value): global rank global lastValue if value == lastValue: return rank else: rank += 1 lastValue = value return rank # Main part, RANK_EPDO = getNextRank(!EPDO!)
RANK_EPDO = getNextRank(!EPDO!)