Skip to content
New issue

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

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

Already on GitHub? # to your account

REF: Add back attr passing in concat by attribute #59195

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Refactor Internal refactoring of code Reshaping Concat, Merge/Join, Stack/Unstack, Explode metadata _metadata, .attrs labels Jul 6, 2024
@@ -6017,16 +6017,17 @@ def __finalize__(self, other, method: str | None = None, **kwargs) -> Self:
object.__setattr__(self, name, getattr(other, name, None))

if method == "concat":
objs = kwargs["objs"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly more performant to define objs=other.objs once?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of kwargs? Will this mess up for subclasssss?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly more performant to define objs=other.objs once?

Sure thing. Make sense

Can we get rid of kwargs? Will this mess up for subclasssss?

Looks generally unused but not exactly sure the scope of how this is used. I'd prefer to maybe do this in a separate change

@mroeschke mroeschke added this to the 3.0 milestone Jul 8, 2024
@mroeschke
Copy link
Member Author

Going to merge to fix geopandas CI downstream. Happy to follow up if needed

@mroeschke mroeschke merged commit ab433af into pandas-dev:main Jul 8, 2024
45 checks passed
@mroeschke mroeschke deleted the fix/concat/attr branch July 8, 2024 18:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
metadata _metadata, .attrs Refactor Internal refactoring of code Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants