Name | pandera JSON |
Version |
0.25.0
JSON |
| download |
home_page | None |
Summary | A light-weight and flexible data validation and testing tool for statistical data objects. |
upload_time | 2025-07-08 19:20:22 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2018 Niels Bantilan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
pandas
validation
data-structures
|
VCS |
 |
bugtrack_url |
|
requirements |
pip
packaging
typing_extensions
hypothesis
pyyaml
typing_inspect
frictionless
pyarrow
pydantic
scipy
pandas-stubs
pyspark
polars
modin
protobuf
geopandas
shapely
fastapi
black
numpy
pandas
isort
joblib
mypy
pylint
pytest
pytest-cov
pytest-xdist
pytest-asyncio
pytz
xdoctest
nox
uv
setuptools
ibis-framework
uvicorn
python-multipart
duckdb
sphinx
sphinx-design
sphinx-autodoc-typehints
sphinx-copybutton
recommonmark
myst-nb
twine
asv
pre_commit
dask
distributed
ibis-framework
furo
sphinx-docsearch
grpcio
ray
typeguard
types-click
types-pytz
types-pyyaml
types-requests
types-setuptools
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
<br>
<div align="center"><a href="https://www.union.ai/pandera"><img src="docs/source/_static/pandera-banner.png" width="400"></a></div>
<h1 align="center">
The Open-source Framework for Validating DataFrame-like Objects
</h1>
<p align="center">
📊 🔎 ✅
</p>
<p align="center">
<i>Data validation for scientists, engineers, and analysts seeking correctness.</i>
</p>
<br>
[](https://github.com/unionai-oss/pandera/actions/workflows/ci-tests.yml?query=branch%3Amain)
[](https://pandera.readthedocs.io/en/stable/?badge=stable)
[](https://pypi.org/project/pandera/)
[](https://pypi.python.org/pypi/)
[](https://github.com/pyOpenSci/software-review/issues/12)
[](https://www.repostatus.org/#active)
[](https://pandera.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/unionai-oss/pandera)
[](https://pypi.python.org/pypi/pandera/)
[](https://doi.org/10.5281/zenodo.3385265)
[](https://pandera-dev.github.io/pandera-asv-logs/)
[](https://pepy.tech/project/pandera)
[](https://pepy.tech/project/pandera)
[](https://anaconda.org/conda-forge/pandera)
[](https://flyte-org.slack.com/archives/C08FDTY2X3L)
Pandera is a [Union.ai](https://union.ai/blog-post/pandera-joins-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](https://pandera.readthedocs.io/en/stable/supported_libraries.html), including [pandas](http://pandas.pydata.org), [polars](https://docs.pola.rs/), [pyspark](https://spark.apache.org/docs/latest/api/python/index.html), 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:
```python
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:
```python
# 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:
```python
# 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 `DataFrameSchema`s and `DataFrameModel`s
> for `pandas` data structures like `DataFrame`s. Defining a dataframe schema from
> the top-level `pandera` module will produce a `FutureWarning`:
>
> ```python
> import pandera as pa
>
> schema = pa.DataFrameSchema({"col": pa.Column(str)})
> ```
>
> Update your import to:
>
> ```python
> 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 a future version
## Next steps
See the [official documentation](https://pandera.readthedocs.io) to learn more.
Raw data
{
"_id": null,
"home_page": null,
"name": "pandera",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "pandas, validation, data-structures",
"author": null,
"author_email": "Niels Bantilan <niels.bantilan@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/13/c1/02f78cd18cd32a009405c847dcf430a97d1a8c162f6e8872acae928c8f20/pandera-0.25.0.tar.gz",
"platform": null,
"description": "<br>\n<div align=\"center\"><a href=\"https://www.union.ai/pandera\"><img src=\"docs/source/_static/pandera-banner.png\" width=\"400\"></a></div>\n\n<h1 align=\"center\">\n The Open-source Framework for Validating DataFrame-like Objects\n</h1>\n\n<p align=\"center\">\n \ud83d\udcca \ud83d\udd0e \u2705\n</p>\n\n<p align=\"center\">\n <i>Data validation for scientists, engineers, and analysts seeking correctness.</i>\n</p>\n\n<br>\n\n\n[](https://github.com/unionai-oss/pandera/actions/workflows/ci-tests.yml?query=branch%3Amain)\n[](https://pandera.readthedocs.io/en/stable/?badge=stable)\n[](https://pypi.org/project/pandera/)\n[](https://pypi.python.org/pypi/)\n[](https://github.com/pyOpenSci/software-review/issues/12)\n[](https://www.repostatus.org/#active)\n[](https://pandera.readthedocs.io/en/latest/?badge=latest)\n[](https://codecov.io/gh/unionai-oss/pandera)\n[](https://pypi.python.org/pypi/pandera/)\n[](https://doi.org/10.5281/zenodo.3385265)\n[](https://pandera-dev.github.io/pandera-asv-logs/)\n[](https://pepy.tech/project/pandera)\n[](https://pepy.tech/project/pandera)\n[](https://anaconda.org/conda-forge/pandera)\n[](https://flyte-org.slack.com/archives/C08FDTY2X3L)\n\nPandera is a [Union.ai](https://union.ai/blog-post/pandera-joins-union-ai) open\nsource project that provides a flexible and expressive API for performing data\nvalidation on dataframe-like objects. The goal of Pandera is to make data\nprocessing pipelines more readable and robust with statistically typed\ndataframes.\n\n## Install\n\nPandera supports [multiple dataframe libraries](https://pandera.readthedocs.io/en/stable/supported_libraries.html), including [pandas](http://pandas.pydata.org), [polars](https://docs.pola.rs/), [pyspark](https://spark.apache.org/docs/latest/api/python/index.html), and more. To validate `pandas` DataFrames, install Pandera with the `pandas` extra:\n\n**With `pip`:**\n\n```\npip install 'pandera[pandas]'\n```\n\n**With `uv`:**\n\n```\nuv pip install 'pandera[pandas]'\n```\n\n**With `conda`:**\n\n```\nconda install -c conda-forge pandera-pandas\n```\n\n## Get started\n\nFirst, create a dataframe:\n\n```python\nimport pandas as pd\nimport pandera.pandas as pa\n\n# data to validate\ndf = pd.DataFrame({\n \"column1\": [1, 2, 3],\n \"column2\": [1.1, 1.2, 1.3],\n \"column3\": [\"a\", \"b\", \"c\"],\n})\n```\n\nValidate the data using the object-based API:\n\n```python\n# define a schema\nschema = pa.DataFrameSchema({\n \"column1\": pa.Column(int, pa.Check.ge(0)),\n \"column2\": pa.Column(float, pa.Check.lt(10)),\n \"column3\": pa.Column(\n str,\n [\n pa.Check.isin([*\"abc\"]),\n pa.Check(lambda series: series.str.len() == 1),\n ]\n ),\n})\n\nprint(schema.validate(df))\n# column1 column2 column3\n# 0 1 1.1 a\n# 1 2 1.2 b\n# 2 3 1.3 c\n```\n\nOr validate the data using the class-based API:\n\n```python\n# define a schema\nclass Schema(pa.DataFrameModel):\n column1: int = pa.Field(ge=0)\n column2: float = pa.Field(lt=10)\n column3: str = pa.Field(isin=[*\"abc\"])\n\n @pa.check(\"column3\")\n def custom_check(cls, series: pd.Series) -> pd.Series:\n return series.str.len() == 1\n\nprint(Schema.validate(df))\n# column1 column2 column3\n# 0 1 1.1 a\n# 1 2 1.2 b\n# 2 3 1.3 c\n```\n\n\n> [!WARNING]\n> Pandera `v0.24.0` introduces the `pandera.pandas` module, which is now the\n> (highly) recommended way of defining `DataFrameSchema`s and `DataFrameModel`s\n> for `pandas` data structures like `DataFrame`s. Defining a dataframe schema from\n> the top-level `pandera` module will produce a `FutureWarning`:\n>\n> ```python\n> import pandera as pa\n>\n> schema = pa.DataFrameSchema({\"col\": pa.Column(str)})\n> ```\n>\n> Update your import to:\n>\n> ```python\n> import pandera.pandas as pa\n> ```\n>\n> And all of the rest of your pandera code should work. Using the top-level\n> `pandera` module to access `DataFrameSchema` and the other pandera classes\n> or functions will be deprecated in a future version\n\n\n## Next steps\n\nSee the [official documentation](https://pandera.readthedocs.io) to learn more.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2018 Niels Bantilan\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "A light-weight and flexible data validation and testing tool for statistical data objects.",
"version": "0.25.0",
"project_urls": {
"Documentation": "https://pandera.readthedocs.io",
"Homepage": "https://github.com/pandera-dev/pandera",
"Issue Tracker": "https://github.com/pandera-dev/pandera/issues"
},
"split_keywords": [
"pandas",
" validation",
" data-structures"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "71e0234707103c742555e1c23bff51f3f0e496c144cd76fcf5a6b800dfe193f2",
"md5": "c307c797f756ca0cb26d1e8004ffbf71",
"sha256": "365a555accc46404466641203e297722d424d74a1315f077ab899e1344f82303"
},
"downloads": -1,
"filename": "pandera-0.25.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c307c797f756ca0cb26d1e8004ffbf71",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 293336,
"upload_time": "2025-07-08T19:20:20",
"upload_time_iso_8601": "2025-07-08T19:20:20.440243Z",
"url": "https://files.pythonhosted.org/packages/71/e0/234707103c742555e1c23bff51f3f0e496c144cd76fcf5a6b800dfe193f2/pandera-0.25.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "13c102f78cd18cd32a009405c847dcf430a97d1a8c162f6e8872acae928c8f20",
"md5": "386c39e619179a9a04473e72aec1b1a8",
"sha256": "af3bbaa163672c91b83d59d70715f25c4134dbccfc8bc89a642a2f0e23db951e"
},
"downloads": -1,
"filename": "pandera-0.25.0.tar.gz",
"has_sig": false,
"md5_digest": "386c39e619179a9a04473e72aec1b1a8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 555391,
"upload_time": "2025-07-08T19:20:22",
"upload_time_iso_8601": "2025-07-08T19:20:22.106587Z",
"url": "https://files.pythonhosted.org/packages/13/c1/02f78cd18cd32a009405c847dcf430a97d1a8c162f6e8872acae928c8f20/pandera-0.25.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-08 19:20:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pandera-dev",
"github_project": "pandera",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "pip",
"specs": []
},
{
"name": "packaging",
"specs": [
[
">=",
"20.0"
]
]
},
{
"name": "typing_extensions",
"specs": []
},
{
"name": "hypothesis",
"specs": [
[
">=",
"6.92.7"
]
]
},
{
"name": "pyyaml",
"specs": [
[
">=",
"5.1"
]
]
},
{
"name": "typing_inspect",
"specs": [
[
">=",
"0.6.0"
]
]
},
{
"name": "frictionless",
"specs": [
[
"<=",
"4.40.8"
]
]
},
{
"name": "pyarrow",
"specs": [
[
">=",
"13"
]
]
},
{
"name": "pydantic",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "pandas-stubs",
"specs": []
},
{
"name": "pyspark",
"specs": [
[
"<",
"4.0.0"
],
[
">=",
"3.2.0"
]
]
},
{
"name": "polars",
"specs": [
[
">=",
"0.20.0"
]
]
},
{
"name": "modin",
"specs": []
},
{
"name": "protobuf",
"specs": []
},
{
"name": "geopandas",
"specs": [
[
"<",
"1.1.0"
]
]
},
{
"name": "shapely",
"specs": []
},
{
"name": "fastapi",
"specs": []
},
{
"name": "black",
"specs": [
[
">=",
"24.0"
]
]
},
{
"name": "numpy",
"specs": [
[
">=",
"1.24.4"
]
]
},
{
"name": "pandas",
"specs": [
[
">=",
"2.1.1"
]
]
},
{
"name": "isort",
"specs": [
[
">=",
"5.7.0"
]
]
},
{
"name": "joblib",
"specs": []
},
{
"name": "mypy",
"specs": [
[
"==",
"1.10.0"
]
]
},
{
"name": "pylint",
"specs": [
[
"<",
"3.3"
]
]
},
{
"name": "pytest",
"specs": []
},
{
"name": "pytest-cov",
"specs": []
},
{
"name": "pytest-xdist",
"specs": []
},
{
"name": "pytest-asyncio",
"specs": []
},
{
"name": "pytz",
"specs": []
},
{
"name": "xdoctest",
"specs": []
},
{
"name": "nox",
"specs": []
},
{
"name": "uv",
"specs": []
},
{
"name": "setuptools",
"specs": []
},
{
"name": "ibis-framework",
"specs": []
},
{
"name": "uvicorn",
"specs": []
},
{
"name": "python-multipart",
"specs": []
},
{
"name": "duckdb",
"specs": []
},
{
"name": "sphinx",
"specs": []
},
{
"name": "sphinx-design",
"specs": []
},
{
"name": "sphinx-autodoc-typehints",
"specs": [
[
"<=",
"1.14.1"
]
]
},
{
"name": "sphinx-copybutton",
"specs": []
},
{
"name": "recommonmark",
"specs": []
},
{
"name": "myst-nb",
"specs": []
},
{
"name": "twine",
"specs": []
},
{
"name": "asv",
"specs": [
[
">=",
"0.5.1"
]
]
},
{
"name": "pre_commit",
"specs": []
},
{
"name": "dask",
"specs": []
},
{
"name": "distributed",
"specs": []
},
{
"name": "ibis-framework",
"specs": [
[
">=",
"9.0.0"
]
]
},
{
"name": "furo",
"specs": []
},
{
"name": "sphinx-docsearch",
"specs": []
},
{
"name": "grpcio",
"specs": []
},
{
"name": "ray",
"specs": []
},
{
"name": "typeguard",
"specs": []
},
{
"name": "types-click",
"specs": []
},
{
"name": "types-pytz",
"specs": []
},
{
"name": "types-pyyaml",
"specs": []
},
{
"name": "types-requests",
"specs": []
},
{
"name": "types-setuptools",
"specs": []
}
],
"lcname": "pandera"
}