Columns converted to str
if there is one Category
column and coerce = True
#1806
Labels
bug
Something isn't working
str
if there is one Category
column and coerce = True
#1806
Describe the bug
A clear and concise description of what the bug is.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Exception:
pandera.errors.SchemaError: expected column 'a' to have type Datetime(time_unit='us', time_zone=None), got String
When checking the
df
in debug mode, we see that it's after the coerce of columnb
that columna
becomes converted to str.Expected behavior
The dataframe should've been validated and no types changed in this case. Column
b
should be coerced to pl.Category.Desktop (please complete the following information):
OS: macOS 14.6.1
Python 3.12.4
polars-lts-cpu 1.6.0
pandera 0.20.3
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: