DataConsistencyChecker ยท Python
Understand what makes a row unusual.¶
Discover patterns in your tables, find the rows that break them, and see the checks behind every finding. Interpretable data quality and outlier detection, directly on pandas DataFrames.
Discover relationships¶
Find regularities within columns, between columns and across rows. Work with numeric, string, categorical and date/time data without encoding or scaling.
Explain each exception¶
Review the rows that break a pattern, with descriptions, examples and plots. Trace an outlier score back to the checks and columns that contributed to it.
Repeat the analysis¶
Use the same configuration in notebooks, Python scripts and the CLI. Export structured JSON or HTML reports to share findings and inspect failed checks.
From a table to an explanation¶
DataConsistencyChecker looks for patterns such as "values are always positive", "total is the product of
price and quantity", or "these two dates are always a week apart". It reports both the relationships that
hold and the rows that break them, helping you explore a dataset and investigate possible data-quality issues.
Start with a CSV file or an existing DataFrame:
import pandas as pd
from data_consistency_checker import DataConsistencyChecker
df = pd.read_csv("orders.csv")
dc = DataConsistencyChecker()
dc.init_data(df)
dc.check_data_quality()
dc.summarize_patterns_and_exceptions()
dc.display_detailed_results() # findings, example rows and plots
The quickstart includes a complete sample dataset and walks through the results. For file-based workflows, the command-line guide covers CSV, TSV and JSON input.
Read the findings in context¶
A row's outlier score counts the patterns with exceptions that flag it. Repeated flags help prioritize review; an unusual row is not necessarily an error. Every score can be traced back to individual findings.
Read how the checks work for contamination thresholds and limitations, or explore practical examples for analysis and reporting workflows.
Acknowledgements¶
DataConsistencyChecker is based on the original
DataConsistencyChecker by
Brett Kennedy, which introduced the approach and the checks. This project
continues that work as an installable package, with tests and documentation. To cite it, use the repository's
CITATION.cff.