Simpan hanya duplikat panda beberapa kolom
df[df.duplicated(['col1', 'col2', 'col3'], keep=False)]
Tomer Mantzuri
df[df.duplicated(['col1', 'col2', 'col3'], keep=False)]
import pandas as pd
df = pd.DataFrame({"A":["foo", "foo", "foo", "bar"], "B":[0,1,1,1], "C":["A","A","B","A"]})
df.drop_duplicates(subset=['A', 'C'], keep=False)