how to remove duplicate columns in datafram in pythn code example
Example 1: python - remove repeted columns in a df
df.loc[:,~df.T.duplicated(keep='first')]
Example 2: remove duplicate columns python dataframe
df = df.loc[:,~df.columns.duplicated()]