df = df.loc[:,~df.columns.duplicated()].copy() # https://stackoverflow.com/questions/14984119/python-pandas-remove-duplicate-columns