Closed r-bar closed 3 weeks ago
Thanks for reporting this @r-bar FYI Series[Type]
annotations is currently not supported in the polars API, see https://github.com/unionai-oss/pandera/pull/1588 and ongoing discussion here: https://github.com/unionai-oss/pandera/issues/1594.
Looking into this, planning on supporting:
class Lists(pa.DataFrameModel):
"""Most basic, expected form given the working schema above."""
id: int
lists: list[str]
Description
Pandera DataFrameModels do not support parameterized types for polars, while DataFrameSchemas do.
Example
Here is an example of a working DataFrameSchema and several variations of broken DataFrameModels.
When run with the following python / library versions:
the above script produces:
Expected behavior
I would expect any column types that are valid to pass to DataFrameSchema's constructor to also be valid as annotations for DataFrameModel.
Desktop (please complete the following information):