A small, reproducible Python tool for auditing CSV files before analysis or machine-learning workflows.
- Reports row/column counts, duplicate rows, missing values, and duplicate column names.
- Identifies constant columns and columns with mixed data types.
- Saves machine-readable JSON and a concise text report.
- Includes a tiny example dataset and automated tests.
Python 3.10+ is recommended.
python -m venv .venv
source .venv/bin/activate # Linux/macOS
# Windows: .venv\Scripts\activate
pip install -r requirements.txt
python -m src.audit_csv data/sample_messy.csv --outdir outputsThe sample intentionally contains a missing value, a duplicate row, and a constant column so the audit has something to report.
python -m src.audit_csv path/to/your_file.csv --outdir outputsOutputs:
outputs/audit_report.jsonoutputs/audit_summary.txt
python -m unittest discover -s tests -vThis is a lightweight structural audit, not a domain-specific validator. It does not decide whether a value is scientifically plausible or whether a target has leaked into model inputs. Review the report in the context of your data.
MIT