Skip to content

ENH: Implement "Pydantic protocol" #53999

Open
@Kludex

Description

@Kludex

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I wish I could use Pydantic with Pandas without the need of customization or external library.

Feature Description

The idea would be to implement the __get_pydantic_core_schema__ mentioned here on pd.Series, pd.DataFrame, and others.

Alternative Solutions

There's a PR in pydantic-extra-types to include a custom type for pd.Series.

Additional Context

We have more information on the migration guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds DiscussionRequires discussion from core team before further actionTypingtype annotations, mypy/pyright type checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions