Skip to main content

pandalens

Watch what pandas does to your data, one step at a time.

import pandalens          # opens a live view in your browser
import pandas as pd

df = pd.DataFrame({"k": [1, 1, 2], "x": [1.0, 2.0, 3.0]})
med = df.groupby("k")["x"].median()   # the browser shows the groups, colored
med = med.reset_index()               # ...and why the index became a column

Every pandas call you make (merge, groupby, reset_index, filtering, new columns, ...) appears as a step in the browser tab, with before/after tables, colors showing which rows went where, and a plain-English explanation. Use the step log on the left to review earlier steps, and the variables panel on the right to keep any DataFrame or Series in view.

It works with breakpoints: the browser tab runs in its own process, so it keeps working while your program is paused.

What is shown

Nearly everything you can call in pandas is recorded: creating DataFrames, df['a'], df[mask], .loc/.iloc, operators like a + b and x > 0, merge/concat/join, groupby (rows colored by group), reset_index, sort_values, fillna, rolling, .str/.dt methods, pivot_table, read_csv, and hundreds more. Each step shows the data before and after, highlights what changed, and explains it (in plain English for the common operations, and with pandas' own one-line description for the rest).

Controls

pandalens.pause(); pandalens.resume()
with pandalens.group("my step"):      # show several calls as one entry
    ...
pandalens.show(df, "my table")        # snapshot any DataFrame
pandalens.clear()
pandalens.stop()

Set PANDALENS_NO_BROWSER=1 to stop the browser from opening automatically (the address is printed instead).

Requirements

Python 3.9+ and pandas 2.2 or newer. Tested with pandas 2.2, 2.3 and 3.1 on Python 3.9, 3.12 and 3.13.

Status: early alpha, built as a teaching aid.

Metadata

Release files for pandalens 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandalens 0.1.1
File Size Uploaded Provenance Actions
pandalens-0.1.1.tar.gz 31.9 kB Without provenance Details for pandalens-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pandalens 0.1.1
File Interpreter ABI Platform Actions
pandalens-0.1.1-py3-none-any.whl Python 3 none any Details for pandalens-0.1.1-py3-none-any.whl

Total release size: 65.2 kB

Release files / pandalens-0.1.1.tar.gz

Download URL pandalens-0.1.1.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f96290593fcefeca50ac8eae8e4ad7a8a2a8af86f6960ee81e169f77260b3bc1
BLAKE2b-256 checksum
How to use checksums
f6f9c616fa890f06abce49191f0e64575ddb14d64b6cd1ca78fe6482966edf29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / pandalens-0.1.1-py3-none-any.whl

Download URL pandalens-0.1.1-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63b02468a000dc758bf3a50aa49bc763c24dc9caf70ddcd08da5b550d0de5d1a
BLAKE2b-256 checksum
How to use checksums
eabe6e1cbbafe64f21b7dd4e05011ee3d18215ef469d06721e61c9a079df23d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for pandalens 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page