Skip to content

ENH: Copy attrs on join (possibly depending on left, right, etc.) #60351

Open
@rommeswi

Description

@rommeswi

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

df.join() does not retain the attrs of the dataset. Given that the attrs manual states that "many operations that create new datasets will retain attrs", this seems like an omission.

Feature Description

Join is different from concat because there is a clear dataframe that the operation is on. Therefore, it would seem natural if df.join() would retain the attrs of the initial dataframe.

Alternative Solutions

It would also be possible to make the attrs dependent on "how" but this would only be natural for "left" and "right".

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds InfoClarification about behavior needed to assess issueReshapingConcat, Merge/Join, Stack/Unstack, Explodemetadata_metadata, .attrs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions