Closed Oreilles closed 1 month ago
This is probably too close to when/then/otherwise or replace/replace_strict for it to be a new feature. I'm not the decider but that's my take.
Thanks for your suggestion.
Unfortunately we've decided that we don't want this. We generally prefer to only have a single way of doing things, and expr.mask(condition)
is unclear in whether the True
values or False
values are being masked out.
Description
It would be nice if Polars provided an equivalent to Panda's
mask
operations forExpr
.mask
is syntactic sugar for a common replacement pattern: