pandera.checks.Check.in_range#

classmethod Check.in_range(cls, min_value, max_value, include_min=True, include_max=True, **kwargs)[source]#

Ensure all values of a series are within an interval.

Parameters
  • min_value – Left / lower endpoint of the interval.

  • max_value – Right / upper endpoint of the interval. Must not be smaller than min_value.

  • include_min – Defines whether min_value is also an allowed value (the default) or whether all values must be strictly greater than min_value.

  • include_max – Defines whether min_value is also an allowed value (the default) or whether all values must be strictly smaller than max_value.

  • kwargs – key-word arguments passed into the Check initializer.

Both endpoints must be a type comparable to the dtype of the pandas.Series to be validated.

Return type

Check

Returns

Check object