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): More ergonomic sort args #6896

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Feb 15, 2023

Partially addresses #6451

Update docstrings and type hints for the following methods:

  • DataFrame.sort
  • LazyFrame.sort
  • Series.sort
  • Expr.sort
  • Expr.sort_by
  • Series.arr.sort
  • Expr.arr.sort

Other changes:

  • Dispatch DataFrame.sort to LazyFrame.sort
  • Clean up argument parsing logic
  • Add *args option for DataFrame/Lazyframe.sort and Expr.sort_by + add some tests
  • Make reverse keyword-only everywhere (using the deprecation util)
  • Raise an error when nulls_last is supplied while sorting by multiple arguments

@stinodego stinodego changed the title WIP feat(python): More ergonomic sort args Feb 15, 2023
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Feb 15, 2023
@stinodego stinodego marked this pull request as ready for review February 16, 2023 14:57
@ritchie46 ritchie46 merged commit aa3e303 into pola-rs:master Feb 17, 2023
@stinodego stinodego deleted the sort-by-parsing branch February 22, 2023 18:34
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 python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants