diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index df9f3d07ce7fd..c0ed515b6640a 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -903,14 +903,15 @@ def value_counts_arraylike(values, dropna: bool): def duplicated( - values: ArrayLike, keep: Literal["first", "last", False] = "first" + values: AnyArrayLike, + keep: Literal["first", "last", False] = "first", ) -> np.ndarray: """ Return boolean ndarray denoting duplicate values. Parameters ---------- - values : nd.array, ExtensionArray or Series + values : nd.array, ExtensionArray, Series or Index Array over which to check for duplicate values. keep : {'first', 'last', False}, default 'first' - ``first`` : Mark duplicates as ``True`` except for the first