Pretty Little Summary
Automatic structured summaries of Python objects — DataFrames, arrays, models, plots, and more.
Install
pip install pretty-little-summary
Optional adapters are enabled automatically when their libraries are installed.
No install? Try it in the browser: live playground (runs via Pyodide, nothing uploaded).
Features
- Single function API:
pls.describe(obj) - 40+ adapters across data, viz, and ML libraries
- Works with built-ins out of the box (no required deps)
- Jupyter/IPython history capture for better context
Quick Start
import pretty_little_summary as pls
import pandas as pd
df = pd.DataFrame({
"product": ["Widget", "Gadget", "Doohickey"],
"price": [19.99, 29.99, 39.99],
"quantity": [100, 50, 75]
})
result = pls.describe(df)
print(result.content)
print(result.meta)
Built-in Types
import pretty_little_summary as pls
print(pls.describe([1, 2, 3]).content)
print(pls.describe({"name": "Alice", "age": 30}).content)
NumPy Arrays
import numpy as np
import pretty_little_summary as pls
arr = np.random.rand(100, 50)
result = pls.describe(arr)
print(result.content)
Pandas DataFrames
import pandas as pd
import pretty_little_summary as pls
df = pd.read_csv("data.csv")
result = pls.describe(df)
print(result.content)
Matplotlib Figures
import matplotlib.pyplot as plt
import pretty_little_summary as pls
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [4, 5, 6])
result = pls.describe(fig)
print(result.content)
History Tracking (Jupyter/IPython)
When running inside Jupyter, pretty_little_summary can capture recent code history that created your object:
import pandas as pd
import pretty_little_summary as pls
df = pd.read_csv("data.csv")
df_clean = df.dropna()
result = pls.describe(df_clean)
print(result.history)
Docs site
The docs (docs/index.html, docs/playground.html, docs/eval-report.html)
are a static site with no build step. To run it locally:
cd docs && python3 -m http.server 8000
Then open http://localhost:8000. Notes:
playground.htmlloads Pyodide from a CDN, so it needs internet access even when served locally.playground.htmlinstallspretty-little-summaryfromdocs/dist/*.whlso it always matches this commit'ssrc/instead of a possibly-stale PyPI release. That wheel isn't committed — CI builds it on every docs deploy viapython -m build --wheel -o docs/dist. Build it yourself before serving locally, or the playground falls back to installing from PyPI:.venv/bin/python -m build --wheel -o docs/dist
eval-report.htmlisn't committed — generate it first with:.venv/bin/python -m evals.runner fetch .venv/bin/python -m evals.runner run .venv/bin/python -m evals.viewer --out docs/eval-report.html
(CI does this automatically on every docs deploy.) Its markup lives in the committeddocs/eval-report-template.html;evals/viewer.pyonly injects run data into it.- The playground's curated/gallery example code comes from
docs/examples/*.txt, regenerated via:.venv/bin/python scripts/export_examples.py
Troubleshooting
ModuleNotFoundError: No module named 'pretty_little_summary'
- Ensure you installed the package in the current environment.
- Restart your kernel or interpreter.
Missing optional libraries
If an adapter isn’t available, install its library:
pip install pandas numpy matplotlib
Or install all optional dependencies:
pip install pretty-little-summary[all]
Release files for pretty-little-summary 0.3.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 | |
|---|---|---|---|
| pretty_little_summary-0.3.0.tar.gz | 182.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pretty_little_summary-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 282.7 kB
Release files / pretty_little_summary-0.3.0.tar.gz
| Download URL | pretty_little_summary-0.3.0.tar.gz |
|---|---|
| Size | 182.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ad887d498b3d39f8383bf0e15fcf586faa45d6fe0df156b409e126b0d770200
|
|
BLAKE2b-256 checksum How to use checksums |
984750f62f707a0360bbd793093c48ab95073ae7f9491c2d91a69aae3666b9a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / pretty_little_summary-0.3.0-py3-none-any.whl
| Download URL | pretty_little_summary-0.3.0-py3-none-any.whl |
|---|---|
| Size | 99.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4012b1116b9c96577c00b483d963860b92a9aa9e47d865eada4b9d2ca13a13ca
|
|
BLAKE2b-256 checksum How to use checksums |
93b81467cdce1c5a30589f8edb48c0918ba5505953ecc0488856ef916015deb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|