Skip to content
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

feat(python): Allow iterable of frames as input to align_frames #21209

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Feb 12, 2025

Closes #21133.

Non-breaking enhancement. Allows for list/iterable input of frames in addition to the current positional input, enabling pl.align_frames and pl.concat to be called in a consistent fashion.

Example

import polars as pl

df1 = pl.DataFrame({"x": [3,4,5], "y": [5,8,9]})
df2 = pl.DataFrame({"x": [2,5,4], "y": [3,8,9]})

Current

pl.align_frames(df1, df2, on="x")

New

pl.align_frames([df1, df2], on="x")

(additive; does not replace current calling convention)

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.88%. Comparing base (f69768d) to head (211c73b).
Report is 60 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21209      +/-   ##
==========================================
- Coverage   79.88%   79.88%   -0.01%     
==========================================
  Files        1593     1593              
  Lines      227803   227807       +4     
  Branches     2600     2602       +2     
==========================================
- Hits       181989   181978      -11     
- Misses      45217    45232      +15     
  Partials      597      597              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit 53f0bfd into pola-rs:main Feb 19, 2025
22 checks passed
@alexander-beedie alexander-beedie deleted the align-frames-consistency branch February 22, 2025 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent API of pl.concat() vs pl.align_frames()
2 participants