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

feat(python): split Expr.top_k and Expr.top_k_by into separate functions #16041

Merged
merged 1 commit into from May 4, 2024

Conversation

MarcoGorelli
Copy link
Collaborator

@MarcoGorelli MarcoGorelli commented May 3, 2024

closes #16037

Summary of changes:

  • top_k_by is broken off from top_k
  • removed by and descending args from top_k (they aren't in the latest stable release. by is being removed to split out top_k_by, and descending just doesn't seem useful for a single top_k, you can just use bottom_k...)
  • drive-by: corrected log{}n to log{n} in the docstring
  • removed some tests which are no longer relevant (that's one advantage of splitting the functions up actually)

(same for bottom_k / bottom_k_by)

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels May 3, 2024
@MarcoGorelli MarcoGorelli changed the title chore(python): split Expr.top_k and Expr.top_k_by into separate functions feat(python): split Expr.top_k and Expr.top_k_by into separate functions May 3, 2024
@github-actions github-actions bot added the enhancement New feature or an improvement of an existing feature label May 3, 2024
@ritchie46
Copy link
Member

Nice, now the release isn't blocked 😁

@MarcoGorelli MarcoGorelli marked this pull request as ready for review May 3, 2024 16:02
@ritchie46 ritchie46 merged commit c94de80 into pola-rs:main May 4, 2024
16 of 18 checks passed
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 internal An internal refactor or improvement python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split out Expr.top_k from Expr.top_k_by
2 participants