You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Polars panics when trying to sort (or indexing) a dataframe that contains a column of dtype List(Datetime), i.e. list of timestamps. It works as expected for other list dtypes, e.g. List(Int64).
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: OutOfSpec("ListArray's child's DataType must match. However, the expected DataType is Timestamp(Microsecond, None) while it got Int64.")', /Users/runner/miniforge3/conda-bld/polars_1666114591432/_build_env/.cargo/registry/src/jackfan.us.kg-1ecc6299db9ec823/arrow2-0.14.2/src/array/list/mod.rs:202:71
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
File "/Users/phoni/Projects/scratch/polars_bug.py", line 9, in <module>
frame.sort(by="ix")
File "/Users/phoni/Projects/miniconda3/envs/scratch/lib/python3.9/site-packages/polars/internals/dataframe/frame.py", line 2694, in sort
return self._from_pydf(self._df.sort(by, reverse, nulls_last))
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: OutOfSpec("ListArray's child's DataType must match. However, the expected DataType is Timestamp(Microsecond, None) while it got Int64.")
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
Polars panics when trying to sort (or indexing) a dataframe that contains a column of dtype List(Datetime), i.e. list of timestamps. It works as expected for other list dtypes, e.g. List(Int64).
Reproducible example
Output:
Expected behavior
Calling .sort() should not panic
Installed versions
The text was updated successfully, but these errors were encountered: