pandera.Check.notin

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

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

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

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

Return type

Check

Returns

Check object

Note

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