Remove duplicates from dataframe, based on two columns A,B, keeping row with paritcular category in column c code example
Example 1: remove duplicates based on two columns in dataframe
df.drop_duplicates(['A','B'],keep= 'last')
Example 2: remove duplicate columns python dataframe
df = df.loc[:,~df.columns.duplicated()]