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
arg_sort
struct
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
This was fixed for DataFrame.sort in #7777
DataFrame.sort
I just encountered it again trying to use .rank() + .over()
.rank()
.over()
.sort() + .over() also raises the same exception.
.sort()
.sort() succeeds without .over().
.rank() still raises the exception without .over()
import polars as pl df = pl.DataFrame({ 'row_id':[1,2,3,4,5,6,7,8,9,10], 'Group':[1,1,1,1,1,2,2,2,2,2], 'Var1':[100,100,100,200,200,300,300,400,400,400], 'Var2':[5,5,6,7,8,1,1,2,2,3] }) # PanicException: `arg_sort` operation not supported for dtype `struct[2]` df.with_columns(pl.struct("Var1", "Var2").rank().over("Group")) # PanicException: `arg_sort` operation not supported for dtype `struct[2]` df.with_columns(pl.struct("Var1", "Var2").sort().over("Group")) # PanicException: `arg_sort` operation not supported for dtype `struct[2]` df.with_columns(pl.struct("Var1", "Var2").rank()) # OK df.with_columns(pl.struct("Var1", "Var2").sort())
No exception.
---Version info--- Polars: 0.16.18 Index type: UInt32 Python: 3.10.9 (main, Jan 14 2023, 16:56:26) ---Optional dependencies--- numpy: 1.23.5 pandas: 2.0.0 pyarrow: 9.0.0 connectorx: <not installed> deltalake: <not installed> fsspec: 2022.8.2 matplotlib: 3.5.1 xlsx2csv: 0.8 xlsxwriter: 3.0.8
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
This was fixed for
DataFrame.sort
in #7777I just encountered it again trying to use
.rank()
+.over()
.sort()
+.over()
also raises the same exception..sort()
succeeds without.over()
..rank()
still raises the exception without.over()
Reproducible example
Expected behavior
No exception.
Installed versions
The text was updated successfully, but these errors were encountered: