data_validation_framework.result¶
Util functions.
Classes
|
Class to represent a validation result as a dict. |
|
Class containing the results of a validation task. |
- class data_validation_framework.result.ValidationResult(is_valid, ret_code=None, comment=None, exception=None, **kwargs)¶
Bases:
dict
Class to represent a validation result as a dict.
Some formatting is automatically executed during the dict creation:
if not given, the ret_code is set to 0 if is_valid is True, else it is set to 1.
- if the given ret_code is inconsistent with the given is_valid value, a ValueError is
raised. The ret_code can have a value greater that 1 to mark a warning. In this case, the is_valid value can be either True or False.
- class data_validation_framework.result.ValidationResultSet(*args, output_columns=None, **kwargs)¶
Bases:
DataFrame
Class containing the results of a validation task.
- Parameters:
df (pandas.DataFrame) – Input DataFrame.
output_columns (dict) – New columns to save results in ({<column name>: <default value>})
- format_data(output_columns)¶
Format dataframe.