feat(python): Make the available concat
alignment strategies more generic
#20644
+119
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #20637.
Simple extension to allow for more generic align options in
concat
(the concat strategy for "align" is directly associated with the "how" join method, so we can easily use join methods other than "full" - this can result in significant speedups if we know that "align_left" is sufficient/appropriate for our target frames 🚀)Extends
concat
"how" parameters with "align inner", "align_left", and "align_right" (and an explicit "align_full" which is equivalent to the existing/default "align").Streamlines the internal concat/align code to use
coalesce=True
for all join types; no longer have to manually identify/drop the uncoalesced common join cols. Should get a (minor) speedup from this too.Example