pandera.api.checks.Check.__call__#

Check.__call__(check_obj, column=None)[source]#

Validate pandas DataFrame or Series.

Parameters
  • check_obj (Union[DataFrame, Series]) – pandas DataFrame of Series to validate.

  • column (Optional[str]) – for dataframe checks, apply the check function to this column.

Return type

CheckResult

Returns

CheckResult tuple containing:

check_output: boolean scalar, Series or DataFrame indicating which elements passed the check.

check_passed: boolean scalar that indicating whether the check passed overall.

checked_object: the checked object itself. Depending on the options provided to the Check, this will be a pandas Series, DataFrame, or if the groupby option is specified, a Dict[str, Series] or Dict[str, DataFrame] where the keys are distinct groups.

failure_cases: subset of the check_object that failed.