pandera 0.26.1


pip install pandera

  Latest version

Released: Aug 26, 2025


Meta
Author: Niels Bantilan
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Operating System
  • OS Independent

License
  • OSI Approved :: MIT License

Intended Audience
  • Science/Research

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Topic
  • Scientific/Engineering

The Open-source Framework for Validating DataFrame-like Objects

๐Ÿ“Š ๐Ÿ”Ž โœ…

Data validation for scientists, engineers, and analysts seeking correctness.


CI Build Documentation Status PyPI version shields.io PyPI license pyOpenSci Project Status: Active โ€“ The project has reached a stable, usable state and is being actively developed. Documentation Status codecov PyPI pyversions DOI asv Total Downloads Conda Downloads Slack

Pandera is a Union.ai open source project that provides a flexible and expressive API for performing data validation on dataframe-like objects. The goal of Pandera is to make data processing pipelines more readable and robust with statistically typed dataframes.

Install

Pandera supports multiple dataframe libraries, including pandas, polars, pyspark, and more. To validate pandas DataFrames, install Pandera with the pandas extra:

With pip:

pip install 'pandera[pandas]'

With uv:

uv pip install 'pandera[pandas]'

With conda:

conda install -c conda-forge pandera-pandas

Get started

First, create a dataframe:

import pandas as pd
import pandera.pandas as pa

# data to validate
df = pd.DataFrame({
    "column1": [1, 2, 3],
    "column2": [1.1, 1.2, 1.3],
    "column3": ["a", "b", "c"],
})

Validate the data using the object-based API:

# define a schema
schema = pa.DataFrameSchema({
    "column1": pa.Column(int, pa.Check.ge(0)),
    "column2": pa.Column(float, pa.Check.lt(10)),
    "column3": pa.Column(
        str,
        [
            pa.Check.isin([*"abc"]),
            pa.Check(lambda series: series.str.len() == 1),
        ]
    ),
})

print(schema.validate(df))
#    column1  column2 column3
# 0        1      1.1       a
# 1        2      1.2       b
# 2        3      1.3       c

Or validate the data using the class-based API:

# define a schema
class Schema(pa.DataFrameModel):
    column1: int = pa.Field(ge=0)
    column2: float = pa.Field(lt=10)
    column3: str = pa.Field(isin=[*"abc"])

    @pa.check("column3")
    def custom_check(cls, series: pd.Series) -> pd.Series:
        return series.str.len() == 1

print(Schema.validate(df))
#    column1  column2 column3
# 0        1      1.1       a
# 1        2      1.2       b
# 2        3      1.3       c

[!WARNING] Pandera v0.24.0 introduces the pandera.pandas module, which is now the (highly) recommended way of defining DataFrameSchemas and DataFrameModels for pandas data structures like DataFrames. Defining a dataframe schema from the top-level pandera module will produce a FutureWarning:

import pandera as pa

schema = pa.DataFrameSchema({"col": pa.Column(str)})

Update your import to:

import pandera.pandas as pa

And all of the rest of your pandera code should work. Using the top-level pandera module to access DataFrameSchema and the other pandera classes or functions will be deprecated in version 0.29.0

Next steps

See the official documentation to learn more.

0.26.1 Aug 26, 2025
0.26.0 Aug 13, 2025
0.25.0 Jul 08, 2025
0.25.0rc0 Jul 07, 2025
0.24.0 May 15, 2025
0.24.0rc0 Apr 25, 2025
0.23.1 Mar 08, 2025
0.23.0 Mar 01, 2025
0.23.0b2 Mar 01, 2025
0.23.0b1 Mar 01, 2025
0.22.1 Dec 26, 2024
0.22.0 Dec 23, 2024
0.21.1 Dec 04, 2024
0.21.0 Nov 15, 2024
0.20.4 Sep 03, 2024
0.20.3 Jul 17, 2024
0.20.2 Jul 16, 2024
0.20.1 Jun 27, 2024
0.20.0 Jun 26, 2024
0.19.3 May 14, 2024
0.19.2 May 08, 2024
0.19.1 May 08, 2024
0.19.0 May 06, 2024
0.19.0b4 May 03, 2024
0.19.0b3 Apr 20, 2024
0.19.0b2 Apr 19, 2024
0.19.0b1 Apr 05, 2024
0.19.0b0 Mar 15, 2024
0.18.3 Mar 11, 2024
0.18.2 Mar 11, 2024
0.18.1 Mar 11, 2024
0.18.0 Dec 08, 2023
0.18.0b0 Dec 08, 2023
0.17.2 Sep 30, 2023
0.17.1 Sep 27, 2023
0.17.0 Sep 23, 2023
0.17.0b0 Sep 21, 2023
0.16.1 Jul 17, 2023
0.16.0 Jul 16, 2023
0.16.0b1 Jul 10, 2023
0.16.0b0 Jul 09, 2023
0.16.0a2 Jun 22, 2023
0.16.0a1 Jun 09, 2023
0.16.0a0 May 13, 2023
0.15.2 Jul 08, 2023
0.15.1 May 09, 2023
0.15.0 May 09, 2023
0.15.0b0 May 07, 2023
0.14.5 Mar 20, 2023
0.14.4 Mar 17, 2023
0.14.3 Mar 16, 2023
0.14.2 Mar 14, 2023
0.14.1 Mar 14, 2023
0.14.0 Mar 14, 2023
0.13.4 Nov 02, 2022
0.13.4b0 Oct 31, 2022
0.13.3 Oct 10, 2022
0.13.2 Oct 06, 2022
0.13.1 Oct 05, 2022
0.13.0 Oct 05, 2022
0.13.0b1 Oct 05, 2022
0.13.0b0 Oct 04, 2022
0.12.0 Aug 22, 2022
0.11.0 May 01, 2022
0.11.0b1 Apr 30, 2022
0.11.0b0 Apr 29, 2022
0.10.1 Apr 04, 2022
0.10.0 Apr 01, 2022
0.9.0 Feb 09, 2022
0.8.1 Dec 31, 2021
0.8.0 Nov 13, 2021
0.7.2 Sep 25, 2021
0.7.1 Sep 13, 2021
0.7.0 Aug 06, 2021
0.6.5 Jul 13, 2021
0.6.4 May 06, 2021
0.6.3 Mar 28, 2021
0.6.2 Feb 16, 2021
0.6.1 Jan 07, 2021
0.6.0 Dec 17, 2020
0.5.1 Nov 28, 2020
0.5.0 Oct 25, 2020
0.4.5 Sep 20, 2020
0.4.4 Jul 01, 2020
0.4.3 Jun 16, 2020
0.4.2 Jun 05, 2020
0.4.1 Jun 05, 2020
0.4.0 May 15, 2020
0.3.2 Mar 17, 2020
0.3.1 Mar 11, 2020
0.3.0 Jan 23, 2020
0.2.7 Nov 11, 2019
0.2.6 Nov 11, 2019
0.2.5 Nov 11, 2019
0.2.4 Nov 10, 2019
0.2.3 Oct 04, 2019
0.2.2 Sep 29, 2019
0.2.1 Sep 11, 2019
0.2.0 Sep 11, 2019
0.1.5 Aug 11, 2019
0.1.4 Jun 11, 2019
0.1.3 Jun 10, 2019
0.1.2 Apr 22, 2019
0.1.1 Dec 29, 2018
0.1.0 Dec 16, 2018
0.0.5 Dec 10, 2018
0.0.4 Nov 13, 2018
0.0.3 Nov 11, 2018
0.0.2 Nov 10, 2018
0.0.1 Nov 05, 2018

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
packaging (>=20.0)
pydantic
typeguard
typing_extensions
typing_inspect (>=0.6.0)