pandera.decorators.check_types#

pandera.decorators.check_types(wrapped: pandera.decorators.F, *, with_pydantic: bool = 'False', head: Optional[int] = 'None', tail: Optional[int] = 'None', sample: Optional[int] = 'None', random_state: Optional[int] = 'None', lazy: bool = 'False', inplace: bool = 'False') pandera.decorators.F[source]#
pandera.decorators.check_types(wrapped: None = None, *, with_pydantic: bool = 'False', head: Optional[int] = 'None', tail: Optional[int] = 'None', sample: Optional[int] = 'None', random_state: Optional[int] = 'None', lazy: bool = 'False', inplace: bool = 'False') Callable[[pandera.decorators.F], pandera.decorators.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) – use pydantic.validate_arguments to validate inputs. This function is still needed to validate function outputs.

  • head (Optional[int]) – validate the first n rows. Rows overlapping with tail or sample are de-duplicated.

  • tail (Optional[int]) – validate the last n rows. Rows overlapping with head or sample are de-duplicated.

  • sample (Optional[int]) – validate a random sample of n rows. Rows overlapping with head or tail are de-duplicated.

  • random_state (Optional[int]) – random seed for the sample argument.

  • lazy (bool) – if True, lazily evaluates dataframe against all validation checks and raises a SchemaErrors. Otherwise, raise SchemaError as soon as one occurs.

  • inplace (bool) – if True, applies coercion to the object of validation, otherwise creates a copy of the data.

Return type

Callable