python dataframe drop duplicate code example
Example 1: remove duplicate row in df
df = df.drop_duplicates()
Example 2: remove duplicate columns python dataframe
df = df.loc[:,~df.columns.duplicated()]
df = df.drop_duplicates()
df = df.loc[:,~df.columns.duplicated()]