frame.duplicated(['key1', 'key2'])
frame.duplicated(['key1', 'key2'], take_last=True)
frame.duplicated(['key1', 'key2'], take_last=True) | frame.duplicated([
    'key1', 'key2'])
frame[frame.duplicated(['key1', 'key2'], take_last=True) | frame.duplicated
    (['key1', 'key2'])]
How to analyze all duplicate entries in this Pandas DataFrame?