Although my preference would be to use SQL, like I demonstrated in my previous comment, the lack of correlated subquery support in file geodatabases complicates trying to do so. Fortunately, it can be done in Python without too much extra work.
The itertools.groupby() function was made exactly for situations like this one. The following code works by modifying an existing table to remove the extra rows, so test it out on a copy first.
from itertools import groupby
from operator import itemgetter
fc =
case_fields = ["Planning Polygon ID", "ELCODE", "SeasonCode"]
max_field = "PERCENTAGE"
sql_orderby = "ORDER BY {}, {} DESC".format(", ".join(case_fields), max_field)
with arcpy.da.UpdateCursor(fc, "*", sql_clause=(None, sql_orderby)) as cur:
case_func = itemgetter(
*(cur.fields.index(fld) for fld in case_fields)
)
for key, group in groupby(cur, case_func):
next(group)
for extra in group:
cur.deleteRow()
The format of the code above is flexible enough that it can accommodate a single case field or multiple case fields. Without too much extra work, this code could be expanded to create a handy function where the user passes a few arguments and the table or feature class is collapse/reduced.