Skip to main content

Automatic structured summaries of Python objects - DataFrames, arrays, models, and more

Project description

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.

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)

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]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pretty_little_summary-0.1.1.tar.gz (80.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretty_little_summary-0.1.1-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file pretty_little_summary-0.1.1.tar.gz.

File metadata

  • Download URL: pretty_little_summary-0.1.1.tar.gz
  • Upload date:
  • Size: 80.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for pretty_little_summary-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1ba67a5b8cc84632b4f15f32d9bea8b9ae17ca80e67992728e8e9a1af2147e73
MD5 a9f2e764af9b2ffea34998188bd908b1
BLAKE2b-256 52644826b97eb3baee22da89cac8d346bce8dbd6d35c8a431001d6cdb89b6679

See more details on using hashes here.

File details

Details for the file pretty_little_summary-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pretty_little_summary-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f32ea83607807cb42890d4740c096051d5e162592902179783d5a2fddb58c044
MD5 a076ef51ce6e8c0569b37c4799ac2957
BLAKE2b-256 ff87e029b052c7c43b8b15814682a0fc566d080318e55380de3130ae2899a5ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page