✨ Highlights ✨
Import pandera.pandas
to define schemas for pandas
objects
🚨 Breaking Change
pandera==0.24.0
has dropped the dependency on pandas
and numpy
and has introduced a pandas
extra. This will break any users who relied on pandas
as a the transitive dependency of pandera
to install pandas
. To remediate this, do the following:
Install pandas
explicitly or use the pandas
extra
pip install pandas pandera
# or
pip install 'pandera[pandas]'
Change your import to pandera.pandas
All pandas-specific symbols that were exposed by the top-level pandera
module are now defined in the pandera.pandas
module.
# old import
import pandera as pa
# new import
import pandera.pandas as pa
What's Changed
- Bugfix/1908: handle multidimensional polars Array type by @hsuominen in #1909
- Bugfix/fix pandera compatibility with fastapi by @Jarek-Rolski in #1943
- update pylint version by @cosmicBboy in #1945
- Import for _version to get generated version by @thomasjpfan in #1951
- BUG: fix validate(sample=x) for pl.DataFrame by @m-richards in #1923
- Delete dev requirements that aren't generated/used by @deepyaman in #1953
- Drop dev dependencies to support Python before 3.8 by @deepyaman in #1956
- add UV to dev dependencies by @lundybernard in #1949
- feature(992): Create empty polars DataFrame by @khrapovs in #1950
- Pandas dependency deprecation future warning, add
pandera[pandas]
extra by @cosmicBboy in #1926 - Update imports from pandera to pandera.pandas by @cosmicBboy in #1965
- Bugfix/1938 Improve Pandera DataFrame - Pydantic compatibility by @Jarek-Rolski in #1963
- Blacken a few files that aren't properly formatted by @deepyaman in #1970
- add import and future warning for top-level pandera module by @cosmicBboy in #1969
- Fix inconsistent column filtering in Polars backend with
add_missing_columns
by @ksolarski in #1962 - bugfix: parser is applied before type coercion by @cosmicBboy in #1974
- bugfix: correctly support dataframe-level polars checks by @cosmicBboy in #1972
- enh: enable mypy in more polars places (#1976) by @cosmicBboy in #1977
- bugfix: custom parser runs before getting column_info by @cosmicBboy in #1978
- Add spellchecker and Fix typos by @nathanjmcdougall in #1975
- bugfix: make DataFrameModel MODEL_CACHE thread-aware by @cosmicBboy in #1981
- replace discord with a slack by @cosmicBboy in #1982
- update docs and readme for pandera.pandas FutureWarning by @cosmicBboy in #1983
New Contributors
- @hsuominen made their first contribution in #1909
- @khrapovs made their first contribution in #1950
Full Changelog: v0.23.1...v0.24.0