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.10+ and pandas 2.2 or newer. Tested with pandas 2.3 and 3.1 on Python 3.12.
Status: early alpha, built as a teaching aid.
Metadata
Release files for pandalens 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 | Provenance | Actions |
|---|---|---|---|---|
| pandalens-0.1.0.tar.gz | 31.9 kB | Without provenance | Details for pandalens-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandalens-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pandalens-0.1.0-py3-none-any.whl |
Total release size: 65.2 kB
Release files / pandalens-0.1.0.tar.gz
| Download URL | pandalens-0.1.0.tar.gz |
|---|---|
| Size | 31.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2c0edfe5892e63d60e5c4b11c64bda7fe859d0e824a735f8f9ec2d01e163aca
|
|
BLAKE2b-256 checksum How to use checksums |
b500f3a8a2999a75586c6c9b73b851630a11009f79f840b48bb70fd6281ab226
|
| 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.0-py3-none-any.whl
| Download URL | pandalens-0.1.0-py3-none-any.whl |
|---|---|
| Size | 33.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a097c3e29e2ac94042513112d1e20217058a88211d8ab5d0263c7e6b3a34b9bd
|
|
BLAKE2b-256 checksum How to use checksums |
01527e4e5db27bb2024906eb925bede65c313a42b369b5443e4ee604b4e7fef8
|
| 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.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.
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.