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
{{ message }}
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
Currently, the only way I could figure out might work to get a similar function is to define a class that is inclusive of all columns and then define a derivative class and use the drop() class method of which fields to "ignore".
The text was updated successfully, but these errors were encountered:
I did some more digging in the examples and documentation and one workaround/functional equivalent is to build the polars dataframe directly from the patito model:
Using the same TestClass model and data value from above:
Pydantic models allow you configure how to handle extra fields. You can
forbid
,ignore
, orallow
https://docs.pydantic.dev/usage/model_config/#options
It would be great if this configuration and settings could be carried over into the patito implementation. For example, given the following model:
Then I would be able do the following:
Currently, the only way I could figure out might work to get a similar function is to define a class that is inclusive of all columns and then define a derivative class and use the
drop()
class method of which fields to "ignore".The text was updated successfully, but these errors were encountered: