Answers for "df filter out replicate columns"

1

python - remove repeted columns in a df

df.loc[:,~df.T.duplicated(keep='first')]
Posted by: Guest on October-22-2020
0

remove duplicate columns python dataframe

df = df.loc[:,~df.columns.duplicated()]
Posted by: Guest on May-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language