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

docs: Is maintain_order description in pivot incorrect? #20403

Closed
MarcoGorelli opened this issue Dec 22, 2024 · 1 comment · Fixed by #20416
Closed

docs: Is maintain_order description in pivot incorrect? #20403

MarcoGorelli opened this issue Dec 22, 2024 · 1 comment · Fixed by #20416
Assignees
Labels
accepted Ready for implementation documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@MarcoGorelli
Copy link
Collaborator

MarcoGorelli commented Dec 22, 2024

Description

maintain_order is described to say

    Sort the grouped keys so that the output order is predictable.

I don't think this is right though - the grouped keys (i.e. index) aren't sorted, but rather their input order is maintained

I think this just needs fixing to say

    Ensure that the order of values in `index` is consistent with their order in the input data.

(possibly split along two lines)

Link

https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.pivot.html

@ritchie46
Copy link
Member

Yeah, the group discovery order is maintained. We can make it more clear.

rodrigogiraoserrao added a commit to rodrigogiraoserrao/polars that referenced this issue Dec 23, 2024
@c-peters c-peters added the accepted Ready for implementation label Dec 29, 2024
@c-peters c-peters moved this to Done in Backlog Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants