Skip to content

ENH: Join - Add a parameter to check for duplicates #46622

Closed
@jiri-kulik

Description

@jiri-kulik

Is your feature request related to a problem?

It is arguably more common than not to join dataframes on a unique index. Optional check for uniqueness would help to prevent hidden errors and time spent on debugging.

Describe the solution you'd like

DataFrame.join should get a new parameter on_unique that would, if set to True, check if the index/columns on which joining is performed have duplicates and raise error if yes. Default should be False to keep backward compatibility.

API breaking implications

Default set to False ensures no issues with compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions