list.set_*
on Categoricals/Enums gives confusing error messages
#13912
Labels
A-dtype-categorical
Area: categorical data type
accepted
Ready for implementation
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Seen in polars-u64-idx 0.20.5 and 0.20.6-rc.1. Related: #11730, #11735.
Passing in a python list of strings to
.list.set_*
does not do what I'd expect (automatically cast argument topl.List(pl.Categorical)
, to match the type of the Expr it's operating on). Furthermore, the error messages are confusing, making it difficult to figure out what's going on. If you explicitly passdtype=pl.List(pl.Categorical)
topl.lit
, it works as expected.prints
prints
This works:
prints
Log output
No response
Issue description
n/a
Expected behavior
n/a
Installed versions
polars_u64_idx-0.20.6rc1
The text was updated successfully, but these errors were encountered: