how to handle duplicates in pandas dataframe code example Example: remove duplicate row in df df = df.drop_duplicates()