-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Filter rows using a bitwise operator #6184
Comments
Not sure if there is a more direct way - all I could find regarding bitwise was a feature request: #5009
|
I think we should probably look at exposing expression-level bitwise functionality on a dedicated Note that there is some bitwise functionality available at the df.filter( (pl.col("a") & pl.Series([4]*len(df))) == 0)
# shape: (3, 2)
# ┌─────┬─────┐
# │ a ┆ b │
# │ --- ┆ --- │
# │ i64 ┆ str │
# ╞═════╪═════╡
# │ 2 ┆ a │
# │ 8 ┆ c │
# │ 9 ┆ d │
# └─────┴─────┘ |
Related? #6311 |
Looks like this has been implemented. Running your example gives the expected output:
|
Research
I have searched the above polars tags on Stack Overflow for similar questions.
I have asked my usage related question on Stack Overflow.
Link to question on Stack Overflow
No response
Question about Polars
Is it possible to apply a filter on rows using the bitwise operator? For example:
The text was updated successfully, but these errors were encountered: