We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Noticed in test_pivot_no_index from #1640, the tests fail if I remove .sort("ix", "bar")
.sort("ix", "bar")
gonna have to check this
The text was updated successfully, but these errors were encountered:
(Pdb) df.to_native() shape: (4, 4) ┌─────┬─────┬─────┬─────┐ │ ix ┆ col ┆ foo ┆ bar │ │ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ str ┆ i64 ┆ str │ ╞═════╪═════╪═════╪═════╡ │ 1 ┆ a ┆ 1 ┆ x │ │ 1 ┆ b ┆ 2 ┆ y │ │ 2 ┆ a ┆ 3 ┆ z │ │ 2 ┆ b ┆ 4 ┆ w │ └─────┴─────┴─────┴─────┘ (Pdb) df.to_native().pivot('col', values='foo') shape: (4, 4) ┌─────┬─────┬──────┬──────┐ │ ix ┆ bar ┆ a ┆ b │ │ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ str ┆ i64 ┆ i64 │ ╞═════╪═════╪══════╪══════╡ │ 1 ┆ x ┆ 1 ┆ null │ │ 1 ┆ y ┆ null ┆ 2 │ │ 2 ┆ z ┆ 3 ┆ null │ │ 2 ┆ w ┆ null ┆ 4 │ └─────┴─────┴──────┴──────┘
🤔 is Polars respecting maintain_order here? The grouped columns are 'ix' and 'bar', yet the output isn't sorted according to them
maintain_order
'ix'
'bar'
Sorry, something went wrong.
I think this wasn't quite behaving as-documented in Polars: pola-rs/polars#20403
I'm not sure we should be guaranteeing an output order at all here in Narwhals, and we should remove maintain_order
maintains_order
Successfully merging a pull request may close this issue.
Noticed in test_pivot_no_index from #1640, the tests fail if I remove
.sort("ix", "bar")
gonna have to check this
The text was updated successfully, but these errors were encountered: