Jupyter Notebooks allow users to display:
- Interactive and runnable code cells, typically written in Python
- Markdown cells containing explanatory text, formulas, hyperlinks, tables, pseudocode, images, etc.
Jupyter Notebooks provide an ideal file format for teaching/learning coding concepts and prototyping algorithms.
- Notebook Cell Types
- How to Run Jupyter Notebooks
Notebook Cell Types¶
Markdown Cells¶
Markdown cells contain documentation in Markdown, MyST Markdown, HTML, and/or LaTeX. They are often used to display text, images, hyperlinks, formulas, tables, pseudocode, plots, figures, etc.
Markdown Edit Mode
To enter edit mode in a markdown cell, double-click the cell.

Double-click on a markdown cell to enter edit mode
Markdown Display Mode
To render a markdown cell, select it then:
- Click the play button at the top of the notebook
or
- Use the
shift + enter
“play” shortcut.

A run markdown cell
Code Cells¶
Code cells contain editable and runnable Python code. You can run them sequentially or in any order, once or any number of times.

Selecting and running a code cell
How to Run Jupyter Notebooks¶
Selecting Cells¶
Users may select cells individually or in a batch, and then run the selected cells.
Select an Individual Cell¶
- Click anywhere inside a cell to select it.

A selected cell displays a blue vertical line on the left edge.
Select Multiple Cells¶
- Select a cell by clicking to the left of the text box
- Clicking inside the cell will select it but it will place you in text edit mode and you will not be able to select additonal cells.
- Select additional cells using:
shift + j
orshift + Down-Arrow
to select additional cells belowshift + k
orshift + Up-Arrow
to select additional cells aboveshift + mouse click
to select batches of cells
- Perform batch operations on selected cells with
▶
button or withCtrl + Enter
orCmd + Enter
(Mac).

Selected cells will be surrounded by a blue background
Hide Code Cells¶
You may occasionally wish to hide code cells to reduce clutter.
Collapse an Individual Cell¶

You can hide an individual code cell by clicking the blue vertical line to the left of the code cell.
Collapse Selected Cells or All Cells in a Notebook¶
- Select some code cells and choose the menu option:
View
->Collapse Selected Code
- Select the menu option:
View
->Collapse All Code
Hide Sections of Code Cells beneath a Markdown Cell¶

Hide entire sections of code cells beneath a markdown cell by clicking the vertical blue bar to the left of the markdown cell.
Running Code Cells¶
Code cells may be executed in any order. A cell execution counter to the left of each code cell indicates the order in which the cells were run.

The cell execution counter indicates the order in which code cells have run.
Run a Single Code Cell¶
- Select the cell you wish to run.
- Do one of the following:
- Click the
▶
button at the top of the notebook. Ctrl + Enter
orCmd + Enter
(Mac) to run a cell.Shift + Enter
to run a cell and select the cell belowAlt + Enter
to run a cell and insert an empty cell below
- Click the
Run Multiple Code Cells¶
Run a batch of selected cells¶
- Select a group of cells.
- Do one of the following:
- Click the
▶
button at the top of the notebook. Ctrl + Enter
to run a cell.Shift + Enter
to run a cell and select the cell belowAlt + Enter
to run a cell and insert an empty cell below
- Click the
Run Every Cell Above or Below a Code Cell¶
Select a cell, then:
- Select the menu option:
Run
->Run All Above Selected Cell
- Select the menu option:
Run
->Run Selected Cell and All Below
Run an Entire Notebook¶
If you wish to run every code cell in a notebook, you can do one of the following:
- Select the menu option:
Run
->Run All
- Select the menu option:
Kernel
->Restart Kernel and Run All Cells...
Rerunning a Notebook¶
We recommend restarting the notebook kernel before rerunning it since any initialized variables and data structures from a previous run persist in memory along with their values, which can lead to unintended results.
To restart the kernel so you can begin a fresh notebook run use one of the following options:
- Select the menu option:
Kernel
->Restart Kernel
- Select the menu option:
Kernel
->Restart Kernel and Clear...
Clearing Cell Output Before Closing¶
For large notebooks with a lot of plots and images, we recommend clearing all code cell output before closing or saving a notebook. Leaving the output in place can increase the file size of the notebook, which can cause slower notebook loading times (especially if you have a slow internet connection).