pandera.api.checks.Check.in_range#

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

Ensure all values of a series are within an interval.

Both endpoints must be a type comparable to the dtype of the data object to be validated.

Parameters
  • min_value (~T) – Left / lower endpoint of the interval.

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

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

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

Return type

Check