I am not 100% certain that this solves your problem, but it does what I think it is supposed to do:
print(df)
indexA, indexB = df.idxmax('index').values[:2]
print(F"\n{indexA = }, {indexB = }")
if indexA != indexB:
df2 = df.drop(indexA)
print(F"\n{df2}")
[edit]
Better use of pandas (still learning).
[/edit]