adds And and Or operators to polars plugin nu_expressions#15248
Merged
ayax79 merged 2 commits intonushell:mainfrom Mar 5, 2025
Merged
adds And and Or operators to polars plugin nu_expressions#15248ayax79 merged 2 commits intonushell:mainfrom
ayax79 merged 2 commits intonushell:mainfrom
Conversation
b2e461e to
c24e47b
Compare
c24e47b to
e7e3b30
Compare
e7e3b30 to
5597257
Compare
Contributor
|
Looks good, thanks! |
ayax79
pushed a commit
that referenced
this pull request
Mar 5, 2025
solution for #15242 , based on PR #15248 . Allows doing this: ``` ~/Projects/nushell> [[a, b]; [1., 2.], [3.,3.], [4., 6.]] | polars into-df | polars filter (((polars col a) < 2) xor ((polars col b) > 5)) ╭───┬──────┬──────╮ │ # │ a │ b │ ├───┼──────┼──────┤ │ 0 │ 1.00 │ 2.00 │ │ 1 │ 4.00 │ 6.00 │ ╰───┴──────┴──────╯ ```
ayax79
pushed a commit
that referenced
this pull request
Mar 5, 2025
This PR (based on #15249 and #15248 because it mentions them) adds extra documentation to the main polars command outlining the main datatypes that are used by the plugin. The lack of a description of the types involved in `polars xxx` commands was quite confusing to me when I started using the plugin and this is a first try improving it. I didn't find a better place but please let me know what you think.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
solution for #15242
adds "And"
adds "Or"
but not (yet) xor because polars doesn't have a direct expression for logical_xor