Feature Request: Add how="align_left"
to pl.concat()
for faster alignment
#20637
Labels
enhancement
New feature or an improvement of an existing feature
Description
Currently, in
pl.concat()
withhow="align"
, we can combine multiple DataFrames by auto-determining the common key columns. According to the documentation, this operation always performs a full outer join, which can be relatively slow for large datasets.I noticed that in the internal function
pl.align_frames()
, it is possible to sethow="left"
for alignment, which speeds up the process significantly.Proposal
It would be useful to introduce a
how="align_left"
option inpl.concat()
that performs alignment by always using the keys from the first DataFrame for left joins. This would be a faster alternative to the currenthow="align"
behavior.Benefits
pl.align_frames()
to enhancepl.concat()
.Suggested Implementation
how="align_left"
value topl.concat()
.pl.align_frames()
withhow="left"
to handle the alignment.Example
Additional Notes
If this feature is feasible, updating the documentation and examples to clarify the difference between
how="align"
andhow="align_left"
would be essential.The text was updated successfully, but these errors were encountered: