polars icon indicating copy to clipboard operation
polars copied to clipboard

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

Open thomasb-gr opened this issue 9 months ago • 0 comments

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 avatar May 15 '24 12:05 thomasb-gr