Cells & blocks.
Cells are the unit of work in a notebook. Each one has a type, a source, and an output — and they stack top-to-bottom in the file.
The four types
Every cell is one of four types. The type controls the editor, the runner, and the output.
- Code — Python source. Runs in the project kernel.
- SQL — a query with a chosen connection. Returns a DataFrame.
- Markdown — prose, headings, math, images. Renders inline.
- Chart — a Plotly chart configured from a DataFrame.
Press / at the start of an empty cell to open the type picker, or click the small + button between cells and pick from there.
Adding, moving, deleting
- Add — click + between cells, or hit
Enterat the bottom of the last cell. - Move — grab the cell's drag handle on the left gutter and drop it where you want.
- Delete — open the cell menu (three dots, top-right) or hit
Cmd+Shift+Backspacewhen the cell is focused. - Duplicate — cell menu → Duplicate, or
Cmd+D.
Cells have stable ids in the YAML, so moving them around doesn't break references in dashboards or other notebooks that pin them.
Running cells
The keyboard story is short:
Shift+Enter— run this cell, move to the next.Cmd+Enter— run this cell, stay put.Alt+Enter— run this cell, insert a new one below.
From the toolbar:
- Run all — every cell, top-to-bottom.
- Run from here — this cell and every cell below it.
- Run above — every cell from the top up to (but not including) this one.
# Cell 1
import pandas as pd
df = pd.read_csv("orders.csv")
# Cell 2 — same kernel, df is in scope
df.groupby("region")["amount"].sum()Run state & output
Each cell shows a small badge on its left gutter: idle, queued, running, succeeded, failed. Click the badge to see the last run's timing and any error trace.
Outputs appear directly below the cell. They're saved with the source, so the next time you open the notebook the previous results are already there. See Outputs & exports for what gets serialized inline versus spilled to disk.
A cell that's never been run shows a dotted badge. Run from here is the fastest way to catch up after pulling a notebook from a teammate.
Stopping & restarting
Stop in the toolbar interrupts the current cell. Restart kernel clears all in-memory variables and starts fresh — the source stays put, but you'll need to re-run anything you want back in scope. Use it when an import goes sideways or a global gets stuck.
Next: pick a cell type to learn more — Python, SQL, Markdown, or Charts. Back to the Notebooks overview.