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

DataFrame.group_by.GroupBy.head(n: int) should support negative ints #16239

Open
thomasb-gr opened this issue May 15, 2024 · 0 comments
Open
Labels
enhancement New feature or an improvement of an existing feature

Comments

@thomasb-gr
Copy link

thomasb-gr commented May 15, 2024

Description

polars.DataFrame.head(n) supports negative n to fetch all but the last n rows, but DataFrame.group_by.GroupBy.head(n) does not offer the same functionality. I can work around this by calculating the length manually and then using that, but it seems odd that these two functions behave differently depending on what I'm applying them to.

@thomasb-gr thomasb-gr added the enhancement New feature or an improvement of an existing feature label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant