Skip to content
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

Implement *_horizontal() functions #508

Merged
merged 7 commits into from
Nov 14, 2023
Merged

Conversation

etiennebacher
Copy link
Collaborator

Maybe the behaviour of pl$min() and pl$max() should be updated now since they are now applied on each column independently in py-polars

@etiennebacher etiennebacher changed the title Implement * _horizontal() functions Implement *_horizontal() functions Nov 13, 2023
Copy link
Collaborator

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

Could you also replace pl$all and pl$any?

@etiennebacher
Copy link
Collaborator Author

pl$all() selects all columns so it's not the same, and pl$any() doesn't exist.

There are $all() and $any() expressions but they already apply on columns only, not rowwise

@eitsupi
Copy link
Collaborator

eitsupi commented Nov 14, 2023

Sorry, I may be mistaken.
I saw py-polars renamed any and all in another repository a while ago.
eitsupi/querying-with-prql@4dcdfd6#diff-283f438414438ace78467fe25ce74c3087e8d1c4f6438b90dc5d98fabdf210c5R241

@etiennebacher
Copy link
Collaborator Author

Oh yeah pl.any() exists but is not implement in r-polars yet

@eitsupi
Copy link
Collaborator

eitsupi commented Nov 14, 2023

Can you add examples of "exclude rows with null values in any column" and "exclude rows with null values in all columns"?
I believe these are very common use cases.

@etiennebacher
Copy link
Collaborator Author

etiennebacher commented Nov 14, 2023

Done, is this what you had in mind?

Edit: sorry, I just did your second case

Copy link
Collaborator

@eitsupi eitsupi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks again!

@etiennebacher etiennebacher merged commit 41e82ec into main Nov 14, 2023
23 checks passed
@etiennebacher etiennebacher deleted the horizontal-functions branch November 14, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants