Skip to content

TYP: Update input of core.algorithms.duplicated #42657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down