pandera.decisions.holds¶
- pandera.decisions.holds(instructions, *, context=None, min_probability=0.5, provider=None, name=None)[source]¶
The predicate behind
Holds(), for use inside@dataframe_check.Holdsreturns aCheck, which is whatDataFrameSchema(checks=...)andField(checks=...)want. A@pa.dataframe_checkmethod wants the boolean Series itself:@pa.dataframe_check def name_fits_category(cls, df): return decisions.holds( "The name fits the category", context=["name", "category"], )(df)
- Return type: