dbldatagen.constraints.ranged_values_constraint module

This module defines the ScalarRange class

class RangedValues(columns, lowValue, highValue, strict=False)[source]

Bases: NoPrepareTransformMixin, Constraint

RangedValues Constraint object - validates that column value(s) are between 2 column values

Parameters:
  • columns – Name of column or list of column names

  • lowValue – Tests that columns have values greater than low value (greater or equal if strict is False)

  • highValue – Tests that columns have values less than high value (less or equal if strict is False)

  • strict – If True, excludes low and high values from range. Defaults to False

Note lowValue and highValue must be names of columns that contain the low and high values