Expr.str.replace does not work on Categorical anymore #18717
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
Issue description
Categorical dtype used to work with Expr.str.replace but does not anymore.
I'm not sure if it's a bug or if it's a documentation issue, as this was not mentioned in the changelog. If that's the expected behavior, a breaking change entry would probably be for the best.
Expected behavior
Depending on the view point:
A. This should fail as on 1.7.0, since a Categorical is not a String. I suppose
Expr.cat
could grow str-like methods to keep things separate.B. This should work as on 1.6.0, since Categorical are kind-of-like String. After all:
Installed versions
The text was updated successfully, but these errors were encountered: