DataFrame.
duplicated
Return boolean Series denoting duplicate rows.
Considering certain columns is optional.
Only consider certain columns for identifying duplicates, by default use all of the columns.
Determines which duplicates (if any) to mark.
first : Mark duplicates as True except for the first occurrence.
first
True
last : Mark duplicates as True except for the last occurrence.
last
False : Mark all duplicates as True.