df.drop_duplicates(['A','B'],keep= 'last')
df = df.loc[:,~df.columns.duplicated()]
concat = pd.merge(data_1, data_2, how='inner')
# If same dataset needs to be updated:
df.drop_duplicates(keep=False, inplace=True)
# Drop duplicate columns
df2 = df.T.drop_duplicates().T
print(df2)
#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'])
df = df.loc[:,~df.columns.duplicated()].copy()
# https://stackoverflow.com/questions/14984119/python-pandas-remove-duplicate-columns