table_enforcer.validate package

Submodules

table_enforcer.validate.decorators module

Provide decoration functions to augment the behavior of validator functions.

table_enforcer.validate.decorators.bounded_length(low, high=None)[source]

Test that the length of the data items fall within range: low <= x <= high.

If high is None, treat as exact length.

table_enforcer.validate.decorators.choice(choices)[source]

Test that the data items are members of the set choices.

table_enforcer.validate.decorators.minmax(low, high)[source]

Test that the data items fall within range: low <= x <= high.

table_enforcer.validate.funcs module

Provide builtin validator functions for common use cases.

In general, validators take a single pandas.Series object as input and return a pandas.Series of the same shape and indexes containing True or False relative to which items passed the validation logic.

table_enforcer.validate.funcs.lower(series)[source]

Test that the data items are all lowercase.

table_enforcer.validate.funcs.negative(series: pandas.core.series.Series) → pandas.core.series.Series[source]

Test that the data items are negative.

table_enforcer.validate.funcs.not_null(series: pandas.core.series.Series) → pandas.core.series.Series[source]

Return Series with True/False bools based on which items pass.

table_enforcer.validate.funcs.positive(series: pandas.core.series.Series) → pandas.core.series.Series[source]

Test that the data items are positive.

table_enforcer.validate.funcs.unique(series: pandas.core.series.Series) → pandas.core.series.Series[source]

Test that the data items do not repeat.

table_enforcer.validate.funcs.upper(series)[source]

Test that the data items are all uppercase.

Module contents