-
-
Notifications
You must be signed in to change notification settings - Fork 19.9k
ENH: Implement "Pydantic protocol" #53999
Copy link
Copy link
Open
Labels
EnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionTypingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checking
Metadata
Metadata
Assignees
Labels
EnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionTypingtype annotations, mypy/pyright type checkingtype annotations, mypy/pyright type checking
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 onpd.Series,pd.DataFrame, and others.Alternative Solutions
There's a PR in
pydantic-extra-typesto include a custom type forpd.Series.Additional Context
We have more information on the migration guide.