dataexaminer
A Python library that examines datasets and produces per-column summaries including data type, record count, missing values, and anomaly detection.
Installation
pip install dataexaminer
For Excel file support:
pip install dataexaminer[excel]
Quick Start
from dataexaminer import examine
# From a CSV or Excel file
result = examine("data.csv") # returns a dict
examine("data.csv", output="console") # prints a table
# From a pandas DataFrame
import pandas as pd
df = pd.read_csv("data.csv")
examine(df, output="console")
Example Output
DataExaminer Report — sales_data.csv
Examined: 2026-03-22 14:05:00 Rows: 5,000 Cols: 4
Column Dtype Kind Records Missing Miss% Anomalies Detail
---------- -------------- ----------- ------- ------- ------ --------- -------------------------------------------------
revenue float64 numeric 5,000 23 0.5% 12 12 IQR outliers (fence: 105.0 – 9842.0)
category object categorical 5,000 41 0.8% 8 8 values in rare categories (<1%): ['UNKN', 'N/a']
order_date datetime64[us] datetime 5,000 5 0.1% 3 3 gap(s) >5.0× median (median: 1d, largest: 47d)
notes object categorical 5,000 5,000 100.0% 0 —
What Gets Detected
| Column Type | Anomaly Method | Description |
|---|---|---|
| Numeric | IQR fence (Tukey) | Values outside Q1 ± 1.5 × IQR |
| Categorical | Rare category | Values with frequency below 1% of non-null rows |
| Datetime | Gap detection | Intervals exceeding 5× the median gap; dates outside 1900–2100 |
Programmatic Usage
from dataexaminer import DataExaminer
from dataexaminer.formatters import ConsoleFormatter, DictFormatter
examiner = DataExaminer()
report = examiner.examine(df)
# report.columns is a list of ColumnSummary objects
for col in report.columns:
print(col.column_name, col.missing_count, col.anomaly_count)
Working with the Report Object
report = examiner.examine(df)
print(report.row_count) # total rows
print(report.col_count) # total columns
print(report.examined_at) # datetime of analysis
for col in report.columns:
print(col.column_name) # column name
print(col.dtype) # pandas dtype string
print(col.kind) # "numeric" | "categorical" | "datetime" | "boolean"
print(col.record_count) # total rows
print(col.missing_count) # number of null values
print(col.missing_pct) # percentage of null values
print(col.anomaly_count) # number of anomalies detected
print(col.anomaly_detail) # human-readable description
Dict Output
result = examine("data.csv") # default output="dict"
print(result["row_count"])
print(result["columns"][0]["anomaly_detail"])
Custom Detectors
The library is designed to be extended. Implement AnomalyDetector and pass it in:
from dataexaminer import DataExaminer
from dataexaminer.detectors import AnomalyDetector, IQRAnomalyDetector
import pandas as pd
class ZeroInflationDetector(AnomalyDetector):
"""Flags columns where more than 50% of non-null values are zero."""
def supports(self, series: pd.Series) -> bool:
return pd.api.types.is_numeric_dtype(series)
def detect(self, series: pd.Series) -> tuple[int, str]:
clean = series.dropna()
if clean.empty:
return 0, "—"
zeros = (clean == 0).sum()
pct = zeros / len(clean) * 100
if pct > 50:
return int(zeros), f"{zeros} zero values ({pct:.1f}%)"
return 0, "—"
examiner = DataExaminer(detectors=[IQRAnomalyDetector(), ZeroInflationDetector()])
report = examiner.examine(df)
Tuning Built-in Detectors
from dataexaminer.detectors import IQRAnomalyDetector, RareCategoryDetector, DatetimeAnomalyDetector
examiner = DataExaminer(detectors=[
IQRAnomalyDetector(iqr_multiplier=3.0), # less sensitive to outliers
RareCategoryDetector(threshold_pct=5.0), # flag categories below 5%
DatetimeAnomalyDetector(gap_multiplier=10.0), # only flag very large gaps
])
Supported File Formats
| Format | Requires |
|---|---|
CSV (.csv) |
pandas (included) |
Excel (.xlsx, .xls) |
pip install dataexaminer[excel] |
Requirements
- Python 3.10+
- pandas 2.0+
License
MIT © Aeron Zentner
Metadata
Release files for dataexaminer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dataexaminer-0.1.0.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dataexaminer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / dataexaminer-0.1.0.tar.gz
| Download URL | dataexaminer-0.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8a174bc1dbc24ae74eaad759ed406d41ab1919a7262e1802e694b08b8c81b2e
|
|
BLAKE2b-256 checksum How to use checksums |
43ee827b131c25bdb91f03ff709f393b8fcabf3a84fd0ed554398147abc65f52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / dataexaminer-0.1.0-py3-none-any.whl
| Download URL | dataexaminer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16a5790bf298f8c793f366349faeaafbcfaa5c682e02f1e7dc615d4668e816e1
|
|
BLAKE2b-256 checksum How to use checksums |
6dce28f82fbb3041add5cc96b4fb077659941ca83e2506e3890cf2f710e6ca99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|