-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Expr.is_between() not implemented for str #6625
Comments
It is implemented, but you should write this like: df3 = df.filter(
pl.col("text").is_between(pl.lit("b"), pl.lit("d")),
) It interprets So this is by design, although it may be poor design. It can definitely be confusing. |
Interesting, sounds like a useful feature. Maybe an example could be added in the docs: The error message could be improved, by mentioning that a column was not found, something like this:
Or better |
Good idea; done. Will also (separately) see if we can slightly enrich the |
While this is nice, it's a broader thing that affects many Polars functions. Every function should clearly state how it handles string inputs. We should do that, but it's quite cumbersome 😞 Better error messaging is really the best solution here. |
@2-5, @stinodego: FYI ,have just done a sweep through the |
Problem description
Expr.is_between()
is not implemented forstr
, only<
and>
:Output:
The text was updated successfully, but these errors were encountered: