Skip to content

ENH: Disallow duplicate column names everywhere by default #53217

Open
@joelostblom

Description

@joelostblom

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

Having duplicated columns can lead to confusing downstream behavior that might be difficult to detect, e.g. we recently had this occur in Altair for a couple of users vega/altair#2718.

Feature Description

It was suggested in the PR that introduced the flag to disallow duplicates that this might be suitable as a default option in the future #28394 (comment), but I couldn't find a follow up discussion so I 'm opening this issue to suggest that this becomes the default behavior to protect users from doing things they might not intend to, like selecting the same column twice.

Alternative Solutions

Keep the current default

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIndexRelated to the Index class or subclasses

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions