I have a data frame that has repeating values in 2 columns and I only want to keep the highest value of each combination. For the following data frame:
df = pd.DataFrame(
np.array([['A', 'B ', 3], ['A', 'B', 6], ['C', 'D', 9], ['C', 'D', 2], ['C', 'B', 4]]))
df
how would I get this dataframe as a result:
|A|B|6|
|C|D|9|
|C|B|4|