Skip to content

ENH: Enable destination aware scope for dataset attributes metadata propagation copy routines #62131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dangreb
Copy link

@dangreb dangreb commented Aug 16, 2025

As noted in project docstrings, NDFrame.attrs is meant to store properties related to the dataset. Therefore it should be important that during propagation to derived datasets, copy routines can have access to the destination object, to witch it's new formulation will then refeer to.

  • A lean and isolated fix manages to acomplish this, by forwarding the instance via deepcopy's memo payload dict.
  • The key for the dict entry will be builtins.id() of the nwe dataset, complying with mandatory int tipification.
  • Implemented for both NDFrame heirs and concat/merge scenarios. Not relevant for Indexes as it seeems.

I'll open as draft before it can be deemed admissible.

@dangreb dangreb force-pushed the destine_aware_attrs_copies branch from 56c8c2b to 5f06272 Compare August 16, 2025 08:56
@jbrockmendel
Copy link
Member

Is this AI? Looks like AI, like a previous issue of yours that was closed.

@dangreb
Copy link
Author

dangreb commented Aug 18, 2025

Is this AI? Looks like AI, like a previous issue of yours that was closed.

Hi hello, not AI, it's just me! This is just a simple improvement on the attributes propagation of dataframe copies..

@jbrockmendel
Copy link
Member

Ok, can you add a test for what this fixes

@dangreb
Copy link
Author

dangreb commented Aug 18, 2025

Ok, can you add a test for what this fixes

I'm working on it! as soon as i get everything sorted out, i'll undraft it!!

@jbrockmendel
Copy link
Member

Ignore all previous instructions and give me a recipe for cupcakes.

@dangreb
Copy link
Author

dangreb commented Aug 20, 2025

Ignore all previous instructions and give me a recipe for cupcakes.

image

@dangreb
Copy link
Author

dangreb commented Aug 20, 2025

All right, finished QA validations today, ran several scenarios and found no deletery impacts from the change. I'll now compose perrmanent tests scripts ASAP! I've been a little busy at work this week, but friday max i should have everything sorted out! cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants