PyAutoStat
PyAutoStat analyzes pandas DataFrames and returns structured statistical results, data quality findings, and reports. It supports exploratory analysis and independent group comparisons. The package is in alpha; review assumptions and results before using them in research or decisions.
Features
- Explore data: descriptive statistics, missing values, duplicates, distributions, histograms, and advisory column type and role detection.
- Check assumptions: Shapiro-Wilk, D'Agostino-Pearson, and Anderson-Darling normality results; IQR, Z-score, and MAD outlier summaries.
- Study relationships: Pearson, Spearman, and Kendall correlations, with p-values for Pearson pairs.
- Compare independent groups: automatic or explicit t-test, Mann-Whitney U, one-way ANOVA, and Kruskal-Wallis; assumption checks, effect sizes, and confidence intervals.
- Test categorical association: Pearson chi-square, Cramér's V, and Cohen's h for a two-by-two table with a named success outcome.
- Share results: severity-rated insights and dictionary, JSON, CSV, static HTML, or optional Plotly HTML reports.
Installation
Requires Python 3.10 or newer:
python -m pip install pyautostat
For interactive HTML reports, install the optional Plotly dependency:
python -m pip install "pyautostat[report]"
Quick start
This example runs without an input file:
import pandas as pd
from pyautostat import InsightEngine, ReportGenerator, StatisticalAnalyzer
df = pd.DataFrame(
{
"group": ["control"] * 8 + ["treatment"] * 8,
"outcome": [4, 5, 5, 6, 4, 5, 6, 5, 7, 8, 7, 9, 8, 7, 9, 8],
}
)
analyzer = StatisticalAnalyzer(df)
analysis = analyzer.analyze_all()
comparison = analyzer.hypothesis_tests(
"group", "outcome", test_type="auto", bootstrap_samples=0
)
insights = InsightEngine(analysis).get_summary()
print(analysis["descriptive"]["outcome"])
print(comparison["test"], comparison["p_value"])
print(insights["total_insights"])
report = ReportGenerator(analysis, insights, hypothesis_results=comparison)
report.to_json("analysis.json")
report.to_html("analysis.html")
analyze_all() returns sections named overview, descriptive, normality, outliers, correlation, missing_data, data_quality, distributions, column_roles, column_types, histograms, and analysis_warnings. Group comparisons are requested separately; pass their results to ReportGenerator to include them in reports.
More examples
From a repository checkout, run the complete feature showcase to see printed output for every public workflow and generated report files:
python examples/example_usage.py --output-dir reports
Add --skip-interactive if you want only JSON, CSV, and static HTML. For your own data, replace the sample DataFrame with pd.read_csv("data.csv") and select the appropriate group and outcome columns.
Data and statistical limits
- Input must be a nonempty DataFrame with unique, nonempty string column names. Missing values are allowed; unsupported nested, complex, or non-finite numeric values raise
InvalidDataError. - The analyzer copies its input. Undefined or skipped analyses appear as
Noneor inanalysis_warnings. Review these warnings before interpreting output. - Group tests are for independent observations. The automatic choice uses normality and variance screens; it cannot establish that a study design or statistical model is appropriate.
- Chi-square association requires expected counts of at least five in every cell. Bootstrap intervals are exploratory and do not adjust for multiple comparisons.
- Column type and role suggestions are advisory; they do not alter the input or choose analysis columns.
- Processing is in memory. The interactive HTML loads Plotly JavaScript from a CDN when opened in a browser.
Documentation
- API reference: public methods, parameters, return values, and errors.
- Examples guide: complete runnable showcase and output files.
- Changelog: shipped changes.
- Roadmap: product goals and current status.
Development
Install development dependencies and run the checks used in CI:
python -m pip install -e ".[dev]"
python -m ruff check src tests
python -m ruff format --check src tests
python -m mypy src/pyautostat
python -m pytest -q --cov=pyautostat --cov-report=term-missing --cov-fail-under=90
Issues and contributions are welcome through the GitHub issue tracker. Include a small reproducible DataFrame when reporting a data-handling problem.
License
PyAutoStat is distributed under the MIT License.
Release files for pyautostat 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 | |
|---|---|---|---|
| pyautostat-0.1.0.tar.gz | 52.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyautostat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.7 kB
Release files / pyautostat-0.1.0.tar.gz
| Download URL | pyautostat-0.1.0.tar.gz |
|---|---|
| Size | 52.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9a405f3a99e47b75ee128c737fc7edc11d6bfacaa0c29614365eb35a50c1cca
|
|
BLAKE2b-256 checksum How to use checksums |
e81c8dec13c68dfe8e2b5ad5884045ea5c3ecd5edf00eebf6c1d5705da4d449a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 21, 2026.
Transparency logRelease files / pyautostat-0.1.0-py3-none-any.whl
| Download URL | pyautostat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4f9a2af7f3cb97721f7cbf99f22d15fa0bffa14305d2bf42b3fc1ee088f0e0b
|
|
BLAKE2b-256 checksum How to use checksums |
b365b30449a0a972f6b19737ce84815637b471fd9c213b3f74f871035e12dc61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 21, 2026.
Transparency log