replace other rows in python based on duplicates code example
Example: python: remove duplicate in a specific column
df = df.drop_duplicates(subset=['Column1', 'Column2'], keep='first')
df = df.drop_duplicates(subset=['Column1', 'Column2'], keep='first')