drop duplicates columns code example
Example 1: python - remove repeted columns in a df
df.loc[:,~df.T.duplicated(keep='first')]
Example 2: df remove duplicate rows
df = df.drop_duplicates()
p
df.loc[:,~df.T.duplicated(keep='first')]
df = df.drop_duplicates()
p