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
josh opened this issue
Sep 23, 2024
· 2 comments
· Fixed by #18893
Assignees
Labels
A-panicArea: code that results in panic exceptionsacceptedReady for implementationbugSomething isn't workingP-lowPriority: lowpythonRelated to Python Polars
thread '<unnamed>' panicked at crates/polars-core/src/scalar/mod.rs:46:92:
called `Result::unwrap()` on an `Err` value: SchemaMismatch(ErrString("unexpected value while building Series of type String; found value of type Categorical(None, Physical): \"foo\""))note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceTraceback (most recent call last): File "/workspaces/test/test.py", line 25, in<module> print(df) File "/home/codespace/.python/current/lib/python3.12/site-packages/polars/dataframe/frame.py", line 1171, in __str__returnself._df.as_str() ^^^^^^^^^^^^^^^^^pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: SchemaMismatch(ErrString("unexpected value while building Series of type String; found value of type Categorical(None, Physical): \"foo\""))
Issue description
Immediately casting a String pl.lit to categorical crashes. It seems like you can work around it by creating the column first, then casting as a separate step.
A-panicArea: code that results in panic exceptionsacceptedReady for implementationbugSomething isn't workingP-lowPriority: lowpythonRelated to Python Polars
Checks
Reproducible example
Log output
Issue description
Immediately casting a String
pl.lit
to categorical crashes. It seems like you can work around it by creating the column first, then casting as a separate step.Crashes on
1.8.1
,1.8.0
, okay on1.7.1
,1.6.0
.Expected behavior
Installed versions
The text was updated successfully, but these errors were encountered: