-
-
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
feat(rust, python): Add by
argument for Expr.top_k
and Expr.bottom_k
#15468
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15468 +/- ##
===========================================
+ Coverage 39.16% 81.36% +42.19%
===========================================
Files 1363 1374 +11
Lines 167739 176680 +8941
Branches 3034 2552 -482
===========================================
+ Hits 65703 143754 +78051
+ Misses 101568 32443 -69125
- Partials 468 483 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5171b7f
to
e091ce0
Compare
CodSpeed Performance ReportMerging #15468 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @CanglongCl. Thanks a lot. I shall do a rebase and merge it in.
…om_k` (pola-rs#15468) Co-authored-by: Ritchie Vink <ritchie46@gmail.com>
Closes #10054
If
by
is provided, columns input will be treated entirely. Just a simple wrapper ofExpr.sort_by().head()
.If
by
is not provided, each column will be sort individually (same as before modification).Example
Top k rows by specific column.
Top k by multiple columns with given order.
Get the top k rows by specific column in each group (#10054).
When
by
is not provided, top k of each columns will be returned. (Values ofa
andb
in a row is not in the same in the same row in original DataFrame, which is the same as before modification.)