Eliminar duplicados basados en dos columnas en DataFrame
df.drop_duplicates(['A','B'],keep= 'last')
Sachin
df.drop_duplicates(['A','B'],keep= 'last')
df = df.loc[:,~df.columns.duplicated()]
#Create test data
df1 = pd.DataFrame(np.random.randint(100,size=(1000, 3)),columns=['A','B','C'])
df2 = pd.DataFrame(np.random.randint(100,size=(1000, 3)),columns=['B','C','D'])
pd.merge(df1, df2, how='inner', left_on=['B','C'], right_on=['B','C'])