Dimension#
- class Dimension(df, test_params)[source]#
Bases:
object
A base class for implementing data quality dimension checks on a pandas DataFrame.
- df#
The dataset on which data quality checks will be performed.
- Type:
pandas.DataFrame
- test_params#
A DataFrame specifying parameters for the data quality tests.
- Type:
pandas.DataFrame
- results#
A DataFrame to store the results of data quality checks.
- Type:
pandas.DataFrame
- tests#
A dictionary mapping test names to their respective methods and other metadata.
- Type:
dict
- run_metric(test, func):
Executes a specific data quality check across all relevant columns in the dataset.
- Parameters:
test (str) – The name of the test being executed.
func (function) – A function that implements the logic for the data quality check.
- run_metrics():
Iterates over and executes all configured data quality checks.
- get_results():
Returns a copy of the results DataFrame with data quality check outcomes.
- Returns:
A copy of the DataFrame containing the results of data quality checks, converted to integer data type.
- Return type:
pandas.DataFrame
- get_tests():
Returns the dictionary of configured tests.
- Returns:
A dictionary of configured data quality checks.
- Return type:
dict
- get_date_format():
Returns the user-defined date format from the test parameters input.