FlashEDA
Current version: 0.5.0 · Changelog
Analyse any dataset in a few seconds, then get validated cleaning, feature and training code that runs on the full data, in the engine that fits its size: pandas, polars, DuckDB or PySpark.
FlashEDA analyses a fixed-size random sample, so analysis time barely changes between 100 thousand and 100 million rows.
Install
pip install flasheda # core
pip install "flasheda[fast]" # + polars, DuckDB, pyarrow (recommended for big files)
pip install "flasheda[ml]" # + scikit-learn, for flasheda.train
pip install "flasheda[sql]" # + SQLAlchemy, for database tables
pip install "flasheda[spark]" # + PySpark
pip install "flasheda[all]" # everything except PySpark
Quick start
import flasheda as fe
# 1. Analyse: any size, a few seconds
report = fe.analyze("orders.csv", target="churn", save_pdf=False)
report.show() # console report
report.save_html("report.html") # or report.save_pdf("report.pdf")
# 2. Clean: get a script for the full data, already checked on the sample
code = fe.clean("orders.csv", target="churn", engine="polars")
code.save("clean_orders.py") # then: python clean_orders.py
# 3. Model: compare models on the sample, get prep + training scripts
result = fe.train("orders.csv", target="churn", engine="polars")
result.show() # leaderboard
result.save("prep.py", "train.py") # python prep.py && python train.py → model.joblib
# 4. Guard: learn rules from good data, check every new file
contract = fe.analyze("orders_jan.csv").contract()
fe.check("orders_feb.csv", contract).show()
open("check.py", "w").write(contract.script()) # python check.py new.csv → exit 1 on failure
# 5. Compare: what changed between two datasets
fe.compare("orders_jan.csv", "orders_feb.csv").show()
# Databases work like files
src = fe.sql("postgresql://user:pass@host/shop", table="orders")
fe.analyze(src, target="churn")
What it does
| Overview | true row count (read from file metadata, no full load), types, memory, duplicates |
| Data quality | missing values, outliers, skew, likely ID columns, numbers stored as text, spelling variants, rare categories |
| Target analysis | task type, class balance, per-feature predictive power, possible leakage, recommended metric and validation split |
| Correlations | Pearson (numeric) and Cramér's V (categorical) |
| Reports | console, HTML, PDF, JSON |
| Code generation | one cleaning plan → pandas, polars (lazy, streaming), DuckDB SQL (larger than memory) or PySpark |
| Features | date parts, one-hot / frequency encoding, ratios that beat their inputs |
| Models | baseline, linear, random forest, gradient boosting compared with the right metric and split; training script for the winner |
| Data contracts | rules learned from good data; full-data checks; standalone check script for CI; pandera export |
| Drift | schema changes and per-column drift (PSI, KS, new categories, null-rate change) between two datasets |
| Databases | any SQLAlchemy URL; sampling runs in the database; passwords never stored |
| Validation | generated code is run on the sample and compared with a reference result before you get it |
Cleaning steps
Each step in the generated code has a comment saying why it was added:
- drop likely-ID, mostly-empty, constant and leaky columns
- drop rows where the target is missing, and drop duplicate rows
- convert numbers stored as text (
"12.5","N/A") to numbers - merge spelling variants (
"Delhi"," delhi","DELHI") - group rare categories into
other - add
<col>_was_missingflags when missingness predicts the target - fill nulls (median / mode), log-transform skewed columns, clip outliers
Features and models
fe.train() (or report.train()) adds features on top of the cleaning steps, compares models on the sample, and writes two scripts:
prep.py: cleaning + features for the full data, in the chosen enginetrain.py: scikit-learn training with cross-validation, using the same metric and split, that savesmodel.joblib
The metric and split follow the target: PR-AUC for imbalanced binary targets, MAE for skewed regression targets, time-based splits when there's a date column, and so on.
Data contracts and drift
A contract describes what good data looks like, learned from a sample with tolerances so normal variation passes:
type, missing %, 1st/99th percentile range (catches unit changes like ×100), no negatives, allowed values, uniqueness of IDs.
fe.check() checks every row of a file in one DuckDB pass; contract.script() writes the same check as a standalone script that exits with code 1 on failure, ready for a pipeline or CI job.
fe.compare(old, new) reports added/removed columns, type changes and how much each column shifted (PSI: < 0.1 stable, 0.1–0.25 moderate, ≥ 0.25 major). Dates and IDs are shown as range shifts, since they always move.
Engine choice
| Rows | Engine |
|---|---|
| < 1M | pandas |
| 1M – 200M | polars or DuckDB |
| > 200M | PySpark (if installed) |
Override with fe.analyze(..., engine="duckdb") or report.codegen("duckdb").
Performance
Measured on synthetic messy data:
| Task | Time |
|---|---|
| Analyse a 5.1M-row Parquet file | 0.56 s |
| Sample a 1M-row CSV (0.1.x → 0.2.0) | 37.3 s → 0.65 s |
| Analyse + plan + generate + validate, 1M-row CSV with target | 2.5 s |
| Run the generated polars script on 1M rows | 0.9 s |
fe.train() on a 1M-row CSV (plan, features, 4 models, checks) |
6.7 s |
Generated prep.py + train.py on 1M rows |
1.3 s + 20 s |
| Learn a contract from 1M rows / run the check script on 1M rows | 0.8 s / 0.6–0.9 s |
| Compare two 1M-row files | 0.6 s |
| Analyse a 1M-row SQLite table (5,000 rows transferred) | 0.3 s |
Examples
examples/phase1_demo.py: engine choice and code generation at 0.1M / 1M / 5M rowsexamples/phase2_demo.py: target analysis and cleaning on a 1M-row churn CSVexamples/phase3_demo.py: features, model comparison and training on 1M rowsexamples/phase4_demo.py: contracts, check script, drift and a database on 1M rows
Development
pip install -e ".[dev]"
pytest
License
MIT
Metadata
Release files for flasheda 0.5.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 | Provenance | Actions |
|---|---|---|---|---|
| flasheda-0.5.0.tar.gz | 74.4 kB | With provenance | Details for flasheda-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flasheda-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for flasheda-0.5.0-py3-none-any.whl |
Total release size: 151.4 kB
Release files / flasheda-0.5.0.tar.gz
| Download URL | flasheda-0.5.0.tar.gz |
|---|---|
| Size | 74.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6b78a85e08821e9b21b2e59eea7e5e421a57248c64fb5eba84a4e3d83a173b3
|
|
BLAKE2b-256 checksum How to use checksums |
59036e377efb842fda4bd8f61c52406a574e84bc5755ca1d6d28e01f931aee24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / flasheda-0.5.0-py3-none-any.whl
| Download URL | flasheda-0.5.0-py3-none-any.whl |
|---|---|
| Size | 77.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3d59764c6e7c18c4d2cc243719d3c16966aba5b1025959244e436a3b2bfd270
|
|
BLAKE2b-256 checksum How to use checksums |
b6eae887372717535edcae2de0ee01ed0d460142a855688840c7060a0250e985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for flasheda 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for flasheda-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.