pandas.api.extensions.ExtensionArray.duplicated#

ExtensionArray.duplicated(keep='first')[source]#

Return boolean ndarray denoting duplicate values.

Parameters:
keep{‘first’, ‘last’, False}, default ‘first’
  • first : Mark duplicates as True except for the first occurrence.

  • last : Mark duplicates as True except for the last occurrence.

  • False : Mark all duplicates as True.

Returns:
ndarray[bool]

With true in indices where elements are duplicated and false otherwise.

See also

DataFrame.duplicated

Return boolean Series denoting duplicate rows.

Series.duplicated

Indicate duplicate Series values.

api.extensions.ExtensionArray.unique

Compute the ExtensionArray of unique values.

Examples

>>> pd.array([1, 1, 2, 3, 3], dtype="Int64").duplicated()
array([False,  True, False, False,  True])