Optional , 'first' default, all duplicates are marked True except first one 'last', all duplicates are marked True except last one 'False',all duplicates are marked True
Series : indicates duplicate values.
DataFrame :indicates duplicate rows.( can consider based some column values )
dataframe.duplicated() »
Using Series
In our series below, we have one element as duplicate value ( 'Two' )
import pandas as pd
my_data=pd.Series(['One','Two','Three','Two','Four'])
my_data.duplicated()
Output ( default value of keep is first , keep='first')