Polars-native EDA and comparison report generator that outputs a single self-contained HTML.
Project description
日本語版: README_JP.md
mitoric
A library that generates EDA / comparison reports for Polars DataFrames as a single HTML file.
Features
- Generate a report for a single dataset
- Generate a comparison report for two datasets
- Dataset summary (rows/columns/missing/duplicates, etc.)
- Column profiles (numeric/categorical/text/datetime/boolean)
- Correlation/association calculations
- Histogram bin size switching (10/15/30/50)
Requirements
- Python 3.10+
- polars>=1
- jinja2>=3.1.6
Usage
Report for a single dataset
import polars as pl
from mitoric import generate_single_report
frame = pl.DataFrame(
{
"age": [10, 12, 12, 14],
"city": ["A", "B", "A", "C"],
}
)
html = generate_single_report(frame, save_path="/tmp/report.html")
print(html[:200])
Comparison report for two datasets
import polars as pl
from mitoric import generate_compare_report
left = pl.DataFrame({"value": [1, 2, 3]})
right = pl.DataFrame({"value": [2, 3, 4]})
html = generate_compare_report(
left,
right,
left_name="before",
right_name="after",
save_path="/tmp/compare_report.html",
)
Explicit column type specification
import polars as pl
from mitoric import generate_single_report
from mitoric.models.base import ColumnName, ColumnType, ExplicitType
frame = pl.DataFrame({"flag": ["yes", "no", "yes"]})
explicit_types = [ExplicitType(ColumnName("flag"), ColumnType("categorical"))]
html = generate_single_report(frame, explicit_types=explicit_types)
API
generate_single_report(frame, *, target_columns=None, explicit_types=None, save_path=None)generate_compare_report(left, right, *, target_columns=None, explicit_types=None, save_path=None, left_name=None, right_name=None)
Types supported in explicit_types: numeric, categorical, text, datetime, boolean
Examples
- examples/output/single_report.html
examples/output/compare_report.html
Constraints and Notes
- Only Polars is supported (Pandas is not supported)
- Generated HTML depends on TailwindCSS and chart.js via CDN
- If
save_pathis not specified, HTML is returned as a string and nothing is saved
Disclaimer
This library was built with a fairly high ratio of vibe coding, so it may include unnecessary processing, questionable design, or tests. We will improve it as we find issues.
For Developers
Setup
uv sync
Development
uv sync
make lint
make test
make test_e2e # E2E outputs are saved under examples/output/ for regression checks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mitoric-0.0.1.dev7.tar.gz.
File metadata
- Download URL: mitoric-0.0.1.dev7.tar.gz
- Upload date:
- Size: 319.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5462d64ee8783419cabdfc9e9315334f74a9edb1fe285cf67ac14ff881c7094c
|
|
| MD5 |
2887da91a17df134fafb8092e901a746
|
|
| BLAKE2b-256 |
1cb981808fc472aba89e2e6aa91578b6779b0e5aad3729a6fe6306f176ab7efa
|
Provenance
The following attestation bundles were made for mitoric-0.0.1.dev7.tar.gz:
Publisher:
publish-pypi.yml on yokoc1322/mitoric
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mitoric-0.0.1.dev7.tar.gz -
Subject digest:
5462d64ee8783419cabdfc9e9315334f74a9edb1fe285cf67ac14ff881c7094c - Sigstore transparency entry: 814280666
- Sigstore integration time:
-
Permalink:
yokoc1322/mitoric@188844b2ae5c096f9b02871d472c6bf74bd959e0 -
Branch / Tag:
refs/tags/v0.0.1.dev7 - Owner: https://github.com/yokoc1322
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@188844b2ae5c096f9b02871d472c6bf74bd959e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mitoric-0.0.1.dev7-py3-none-any.whl.
File metadata
- Download URL: mitoric-0.0.1.dev7-py3-none-any.whl
- Upload date:
- Size: 48.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381051df1e1fb2145fa91dc7aa1276af8cde6f665c2786de3a7e66499127c8cf
|
|
| MD5 |
2821743c5013aa31b64f4feccb1268fa
|
|
| BLAKE2b-256 |
e97c5a85aac5162157e8dd1790ae6f8b50c8f30d92859a4f0dde70134a5ee44b
|
Provenance
The following attestation bundles were made for mitoric-0.0.1.dev7-py3-none-any.whl:
Publisher:
publish-pypi.yml on yokoc1322/mitoric
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mitoric-0.0.1.dev7-py3-none-any.whl -
Subject digest:
381051df1e1fb2145fa91dc7aa1276af8cde6f665c2786de3a7e66499127c8cf - Sigstore transparency entry: 814280667
- Sigstore integration time:
-
Permalink:
yokoc1322/mitoric@188844b2ae5c096f9b02871d472c6bf74bd959e0 -
Branch / Tag:
refs/tags/v0.0.1.dev7 - Owner: https://github.com/yokoc1322
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@188844b2ae5c096f9b02871d472c6bf74bd959e0 -
Trigger Event:
push
-
Statement type: