Search
K

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. 1.
    Markdown cells
  2. 2.
    Code cells
  3. 3.
    SQL cells

Use markdown cells

Markdown cells can be used to add descriptions, notes, and documentation to notebooks.

Creating a markdown cell

Menu
Cell shortcut
Hotkey
To create a markdown cell from the file menu:
  1. 1.
    Open the Cell menu from any notebook.
  2. 2.
    Select
    New Markdown Cell.
  3. 3.
    Select the location for the cell.
To create a markdown cell from the cell shortcut:
  1. 1.
    Use the
    button above or below the selected cell to create a new cell.
  2. 2.
    Select Markdown from the cell language drop-down menu.
To create a markdown cell using hotkeys:
  1. 1.
    While in command mode, use hotkeys to insert a cell above (a) or below (b) the current cell.
  2. 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.

Getting help

To see a list of markdown formatting options, click the
icon in the upper-right corner of any cell.
Using markdown

Use code cells

Code cells allow you to write code in Python (or R) that can be executed in the notebook using a kernel.

Creating a code cell

Menu
Cell shortcut
Hotkey
To create a code cell from the cell menu:
  1. 1.
    Open the Cell menu.
  2. 2.
    Select
    New Code Cell.
  3. 3.
    Select the location for the cell.
To create a code cell from the cell shortcut:
  1. 1.
    Use the
    button above or below the selected cell to create a new cell.
  2. 2.
    Select Python from the cell language drop-down menu.
To create a code cell using hotkeys:
  1. 1.
    While in command mode, use hotkeys to insert a cell above (a) or below (b) the current cell.
  2. 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.

Execute cells

To render cell outputs, the code must be executed using a kernel.

To execute a single cell

Menu
Cell shortcut
Footer
Hotkey
To execute a single code cell from the cell menu:
  1. 1.
    Open the Cell menu.
  2. 2.
    Select
    Run Cell, Select Next.
To execute a single code cell from the cell shortcut:
  1. 1.
    Leave edit mode by clicking esc.
  2. 2.
    Click on the
    icon below the cell.
To execute a single code cell from the notebook footer:
  • Click on the
    Run 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.

To execute all cells

Menu
Footer
Hotkey
To execute all cells from the cell menu:
  1. 1.
    Open the Cell menu.
  2. 2.
    Select
    Run All Cells
To execute all cells from the notebook footer:
  • Click on the
    Run 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.

Move cells

To move cells around in the notebook:
Drag cell
Cell shortcut
Cell menu
  1. 1.
    Hover over the grid in the center of the cell to make the
    appear.
  2. 2.
    Drag cell to desired location.
  1. 1.
    Click on the
    menu on the upper-left corner of the cell.
  2. 2.
    Select from the options to move the cell (ex. Move to Top).
  1. 1.
    Open the notebook's Cell menu.
  2. 2.
    Select from the options to move the cell (ex. Move Selected Cells Up).

Delete cells

To move cells around in the notebook:
Cell Icon
Cell shortcut
Hotkey
Click on the
icon to the right of the cell
  1. 1.
    Click on the
    menu on the upper-left corner of the cell.
  2. 2.
    Select
    Delete Cell.
  1. 1.
    Select the cell.
  2. 2.
    Press dd to delete it.

Keyboard shortcuts

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.

Learn more

There are some great demo notebooks to get you started here: Demo notebooks