For example, I have the DataFrame:
a = [{'column_1': 'A', 'column_2': 'B', 'column_3': 20.14}, {'column_1': 'A', 'column_2': 'B', 'column_3': 20.35}]
df = pd.DataFrame(a)
I need to drop the duplicate using two columns -> df.drop_duplicate(['column_1', 'column_2'])
but use the following conditions.
First I need to compare the value in the df['column_3']
column, and keep the entry that is lower in value, in this case 20.14
There may be more than two duplicates in a real table.