Using Dataspell's Interactive DataFrame Viewer for Fast Pandas Inspection and Inline Edits
Learn how to inspect, filter, and edit pandas DataFrames directly inside Dataspell's built-in viewer, with a step-by-step example and notes on performance limits.
29 Nov 2025, 13:42 UTC

Problem: needing quick look‑at data while coding
When exploring a dataset in a Python script, you often want to see the shape, column types, or a few rows without writing extra print statements or opening a notebook.
How Dataspell’s DataFrame viewer works
Dataspell shows an interactive grid next to the Python console whenever a pandas DataFrame variable is in scope. Hovering over the variable name launches the viewer, which lets you scroll, sort by column headers, and type a filter expression in the box above the grid.
Double‑clicking a cell makes it editable; pressing Enter commits the change to the underlying DataFrame variable. The change is visible immediately in the console, but it is not written back to any source file unless you export the DataFrame (e.g., with df.to_csv()) or reassign it.
Worked example: load a CSV, filter rows, edit a value
- Open the Dataspell Python console.
- Run:
import pandas as pd df = pd.read_csv('sample.csv') - Hover over
dfin the console to open the viewer. - Click the filter box above a column (e.g.,
value) and type> 100to show only rows where that column exceeds 100. - Double‑click a cell in the
valuecolumn, change the number, and press Enter. - Return to the console and type
dfto see the updated DataFrame; the edited value appears in place. - If you want to keep the edit, export it:
df.to_csv('edited_sample.csv', index=False)
Trade‑offs and when to step out of the viewer
The viewer is responsive for datasets up to a few hundred thousand rows. With millions of rows the grid can lag, and memory usage may rise because the entire DataFrame is rendered in the IDE.
For complex transformations (group‑bys, merges, or pipelines) it is usually clearer to write the logic in a script or notebook and then inspect the result. Use the viewer for quick sanity checks, spot‑filtering, or manual tweaks, then persist changes through code.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.