how to remove duplicate elements in Pandas code example Example: remove duplicate row in df df = df.drop_duplicates()