Skip to content

DOC: .nlargest/smallest docs specify keep=False as valid parameter #18559

Closed
@mroeschke

Description

@mroeschke

For both DataFrame and Series docs:

keep : {‘first’, ‘last’, False}, default ‘first’
Where there are duplicate values: - first : take the first occurrence. - last : take the last occurrence.

In [2]: pd.Series(range(5)).nlargest(3, keep=False)

ValueError: keep must be either "first", "last"

In [3]: pd.DataFrame(range(5)).nsmallest(3,  0, keep=False)

ValueError: keep must be either "first", "last"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions