Skip to content

PERF: concat_compat #52316

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

Merged
merged 2 commits into from
Mar 31, 2023
Merged

Conversation

jbrockmendel
Copy link
Member

Fastpath for all-matching-dtype case.

elif axis == 0:
return obj._concat_same_type(to_concat_eas)
else:
# e.g. DatetimeArray
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 here with EAs with _concat_same_type without the axis keyword e.g. Sparse?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we only get here (axis=1) from internals.concat, and there pass ea_compat_axis=True in those cases

@mroeschke mroeschke added Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Mar 31, 2023
@jbrockmendel jbrockmendel mentioned this pull request Mar 31, 2023
5 tasks
@mroeschke mroeschke added this to the 2.1 milestone Mar 31, 2023
@mroeschke mroeschke merged commit 9ba4ef8 into pandas-dev:main Mar 31, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the perf-concat-compat branch March 31, 2023 18:32
@mroeschke
Copy link
Member

@jbrockmendel I think there might be typing failures here. Mind taking a look? https://github.com/pandas-dev/pandas/actions/runs/4578025660/jobs/8084134007

@jbrockmendel
Copy link
Member Author

yep, will make a PR shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants