unionai-oss / pandera

A light-weight, flexible, and expressive statistical data testing library
https://www.union.ai/pandera
MIT License
3.27k stars 305 forks source link

Convert `DataFrameSchema` to `SchemaModel`, and infer `SchemaModel`. #891

Closed ghilesmeddour closed 2 years ago

ghilesmeddour commented 2 years ago

Hi,

SchemaModel can be easily converted into a DataFrameSchema using to_schema(), but it seems that the reverse is not possible for the moment. I am wondering if there is a way that I missed to do that. It would also be great I think to be able to generate SchemaModel source using infer_schema() and to_script().

cosmicBboy commented 2 years ago

Hi @ghilesmeddour, this use case is articulated in #393, gonna close this issue.