Skip to content

Allow generating Pandera DataFrameModel models #2980

@imrehg

Description

@imrehg

Is your feature request related to a problem? Please describe.

I'm exporting data from APIs that provide e.g. OpenAPI Specs, and the data is then transformed and used elsewhere. The downstream usage is more database-like, where tools like ibis come really handy. That however doesn't work with e.g. the suggested Pydandtic v2 generated models. What would work, instead is using a model defined by Pandera's DataFrameModel, which then can be validated, and transformed between very different dataframe types.

Describe the solution you'd like

Being able to select --output-model-type to be something like "pandera.DataFrameModel", and it would generate the data model + fields based on the OpenAPI spec.

Describe alternatives you've considered

Manually translating the generated Pydantic schema into Panderas schema, or adding conversions for each generated model along these lines.

Additional context

None at the moment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions