Skip to content

Allow to select index in drop_duplicates and duplicated #9708

Closed
@flying-sheep

Description

@flying-sheep

there’s no way to drop rows with duplicated index using drop_duplicates.

we’d have to add a copy of the index as column, or do this:

df[np.logical_not(df.index.duplicated(take_last=True).values)]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions