classmethod Check.notin(forbidden_values, **kwargs)[source]

Ensure some defined values don’t occur within a series.

Like Check.isin() this check operates on single characters if it is applied on strings. If forbidden_values is a string, it is understood as set of prohibited characters. Any string of length > 1 can’t be in it by design.

  • forbidden_values (Iterable) – The set of values which should not occur. May be any iterable.

  • raise_warning – if True, check raises SchemaWarning instead of SchemaError on validation.

Return type: