pandera.decorators.check_typesΒΆ
- pandera.decorators.check_types(wrapped: F, *, with_pydantic: bool = False, head: int | None = None, tail: int | None = None, sample: int | None = None, random_state: int | None = None, lazy: bool = False, inplace: bool = False) F[source]ΒΆ
- pandera.decorators.check_types(wrapped: None = None, *, with_pydantic: bool = False, head: int | None = None, tail: int | None = None, sample: int | None = None, random_state: int | None = None, lazy: bool = False, inplace: bool = False) Callable[[F], F]
Validate function inputs and output based on type annotations.
See the User Guide for more.
- Parameters:
wrapped β the function to decorate.
with_pydantic (
bool) β usepydantic.validate_argumentsto validate inputs. This function is still needed to validate function outputs.head (
Optional[int,None]) β validate the first n rows. Rows overlapping with tail or sample are de-duplicated.tail (
Optional[int,None]) β validate the last n rows. Rows overlapping with head or sample are de-duplicated.sample (
Optional[int,None]) β validate a random sample of n rows. Rows overlapping with head or tail are de-duplicated.random_state (
Optional[int,None]) β random seed for thesampleargument.lazy (
bool) β if True, lazily evaluates dataframe against all validation checks and raises aSchemaErrors. Otherwise, raiseSchemaErroras soon as one occurs.inplace (
bool) β if True, applies coercion to the object of validation, otherwise creates a copy of the data.
- Return type: