pandas.Index.duplicated
pandas 3.1.1 · Index objects · method
Mark repeated values or rows with a boolean mask. Use keep=False to mark every member of a duplicate set.
Call syntax
Index.duplicated(keep='first')Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
keep |
Optional Positional or keyword Default 'first' |
{'first', 'last', False} Choose which occurrence to retain when values are duplicated or tied. |
Returns
np.ndarray[bool]