Use notebooks
Everything you need to know to get started using notebooks quickly.
Notebooks contain cell inputs and cell outputs. Cell inputs are where we enter code, queries, or markdown and cell outputs are how those inputs are rendered.
There are 3 primary types of cells:
- 1.Markdown cells
- 2.Code cells
- 3.SQL cells
Markdown cells can be used to add descriptions, notes, and documentation to notebooks.
Menu
Cell shortcut
Hotkey
To create a markdown cell from the file menu:
- 1.Open the Cell menu from any notebook.
- 2.SelectNew Markdown Cell.
- 3.Select the location for the cell.
To create a markdown cell from the cell shortcut:
- 1.Use thebutton above or below the selected cell to create a new cell.
- 2.Select Markdown from the cell language drop-down menu.
To create a markdown cell using hotkeys:
- 1.While in command mode, use hotkeys to insert a cell above (a) or below (b) the current cell.
- 2.Press
m
to toggle the cell type to markdown.
Adding content to markdown cells
Double-click the cell to switch into edit mode and then enter the text you'd like to display. When in edit mode, the cell outline is green.
To leave edit mode, Click
esc
or ctrl+enter
at any time. The border of the cell will turn blue to indicate you're no longer in edit mode. To see a list of markdown formatting options, click the
icon in the upper-right corner of any cell.

Using markdown
Code cells allow you to write code in Python (or R) that can be executed in the notebook using a kernel.
Menu
Cell shortcut
Hotkey
To create a code cell from the cell menu:
- 1.Open the Cell menu.
- 2.SelectNew Code Cell.
- 3.Select the location for the cell.
To create a code cell from the cell shortcut:
- 1.Use thebutton above or below the selected cell to create a new cell.
- 2.Select Python from the cell language drop-down menu.
To create a code cell using hotkeys:
- 1.While in command mode, use hotkeys to insert a cell above (a) or below (b) the current cell.
- 2.Select Python from the cell language drop-down menu.
Code cells are always created with the Python kernel by default. To change from Python to R, follow these steps: Change kernel
Writing code
Double-click the cell to switch into edit mode and then enter the code you'd like to execute. When in edit mode, the cell outline is green.
To leave edit mode, Click
esc
at any time. The border of the cell will turn blue to indicate you're no longer in edit mode. To render cell outputs, the code must be executed using a kernel.
Menu
Cell shortcut
Footer
Hotkey
To execute a single code cell from the cell menu:
- 1.Open the Cell menu.
- 2.SelectRun Cell, Select Next.
To execute a single code cell from the cell shortcut:
- 1.Leave edit mode by clicking
esc
. - 2.Click on theicon below the cell.
To execute a single code cell from the notebook footer:
- Click on theRun button from the notebook footer.
To execute a single code cell using a hotkey:
- Press
cmd
+enter
to execute the current cell and keep the current cell in focus. - Press
shift
+enter
to execute the current cell and move the focus to the next cell.
Menu
Footer
Hotkey
To execute all cells from the cell menu:
- 1.Open the Cell menu.
- 2.SelectRun All Cells
To execute all cells from the notebook footer:
- Click on theRun All button from the notebook footer..
To execute all cells using a hotkey: press
cmd
+ shift
+ enter
.If not already started, the kernel will start automatically when a cell is executed.
To move cells around in the notebook:
Drag cell
Cell shortcut
Cell menu
- 1.Hover over the grid in the center of the cell to make theappear.
- 2.Drag cell to desired location.
- 1.Click on themenu on the upper-left corner of the cell.
- 2.Select from the options to move the cell (ex. Move to Top).
- 1.Open the notebook's Cell menu.
- 2.Select from the options to move the cell (ex. Move Selected Cells Up).
To move cells around in the notebook:
Cell Icon
Cell shortcut
Hotkey
Click on the
icon to the right of the cell
- 1.Click on themenu on the upper-left corner of the cell.
- 2.SelectDelete Cell.
- 1.Select the cell.
- 2.Press
dd
to delete it.
To access the list of keyboard shortcuts, go to the Tools menu and select
Keyboard Shortcuts. Alternatively, you can use the keyboard shortcut
h
to bring up this menu.