Closed machow closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 86.11%. Comparing base (
e3649d2
) to head (f879854
). Report is 12 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@jrycw if you have a min, do you mind taking a look? Hopefully this rounds out our polars column selection work!
@machow it's amazing how quickly Polars
is supporting our use case. I need to grab a coffee and take a detailed look at this, as it might impact how users utilize it.
This PR adds support for polars expressions to be used in column selection in addition to polars selectors. It requires polars v0.20.30, but falls back to the old behavior (or requiring a selector object) otherwise.
Note that this is the result of a chain of things:
Which resulted in polars super quickly adding broader support for accepting Expressions and selectors that only result in column selection (and not e.g. transformation, or aliasing; PR https://github.com/pola-rs/polars/pull/16479).
I tried to give reasonably helpful error messages for people who are not on v0.20.3 that use Expr, but also suspect people will upgrade polaras patch versions fairly quickly.
Example
Note both that a list is supported along with the use of expressions (e.g.
pl.col("fctr")
)