Comments (1)
Recommended workaround:
thanks to @cosmicBboy
Use functools.partial
from functools import partial
from pandera import DataFrameModel, Field
NormalizedField = partial(Field, ge=0, le=1)
class GoodModelDF(DataFrameModel):
xnorm: float = NormalizedField()
ynorm: float = NormalizedField()
class AlsoGoodModelDF(DataFrameModel):
xnorm: float = NormalizedField()
from pandera.
Related Issues (20)
- `np.string_` removed from `numpy >= 2.0.0` and used in pandera raises an error. HOT 1
- Lazy validation raises misleading SchemaError when columns are missing
- Add a `Check` for maximum allowed percentage of missing values
- Implement data correction
- Storing rules as json/yaml/database
- Pyright error for custom data type: "Expected type expression but received "_DataTypeClass[Unknown]..." HOT 1
- When mixing `drop_invalid_rows` on `DataFrameSchema` and `Column` level we get a non intuitive behavior HOT 1
- Error on `import pandera.polars as pa` ImportError: cannot import name 'py_type_to_dtype' from 'polars.datatypes' HOT 2
- [BUG]: `Import Error` in `pandera.engines.polars_engine` HOT 2
- [BUG]: use `LazyFrame.collect_schema().names()` over `LazyFrame.columns` HOT 3
- Starting python with -OO fails with pandera >=20 HOT 1
- `DataFrameModel.get_metadata` should not be typed `Optional` HOT 1
- Wrong Column name in SchemaErrors using regex Columns
- Allowing column with type list to be optional HOT 4
- Pass additional `Check` kwargs into `register_check_method`
- Bad type hint for argument unique for DataFrameSchema
- Support Pyarrow data synthesis strategies for Pandas validation engine
- `pandera.api.dataframe.model.DataFrameModel` has unexpected generic subclass behaviour
- Subclassing from `pandera.api.dataframe.model.DataFrameModel` errors on annotated but not initialized fields starting with an underscore
- Add support for polars.Enum
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandera.