
Explanation Example
Comprehensively lists and
explains magic functions
automa
to call magic functions
without the ‘%’
automagic
quickref Launch IPython quick
reference
Pastebins lines from
your current session.
pastebin 3
-20 ~1/1-5
Enters the interactive
debugger
Print command input
and output history
hist
Automatically enter python
debugger after any
exception
pdb
Opens up a special prompt
for manually pasting Python
code for execution
cpaste
Delete all variables and
names defined in the
current namespace
Run a python script
inside a notebook
Display variables defined in
the interactive namespace,
with
varying levels of verbosity
who_ls,
whos
Delete a variable in the
local namespace. Clear any
references to that variable
xdel
Times a single statement
In [561]: %time
method = [a for
a in data if
b.startswith(‘htt
p’)]
JUPYTER NOTEBOOK CHEAT SHEET
Keyboard Shortcuts
Jupyter Notebook is an open-source web application that allows
you to create and share documents that contain live code,
equations, visualizations and narrative text. It is used for data
cleaning and transformation, numerical simulation, statistical
modeling, data visualization, machine learning, and much more.
Java Exceptions
User -Defin ed ExceptionsBuilt-in Exceptions
Jupyter Notebook
Create new
Notebook
Open an existing
Notebook Make copy of the
current Notebook
Save Current
Notebook Rename current
Notebook
Save Current
Notebook & record
Checkpoint Revert Notebook to a
previous Checkpoint
Preview of the
printed Notebook Download Notebook
as-IPython Notebook
Python
HTML
Markdown
PDF
Command Description
enter enter edit mode
Command + a; Command + c; Command + v
select all; copy; paste
Command + z; Command + y undo; redo
Command + s save and checkpoint
Command + b; Command + a
insert cell below; insert cell above
Shift + Enter run cell, select below
Shift + m merge cells
Command + ]; Command + [ indent; dedent
Ctrl + Enter run cell
Option + Return run cell, insert cell below
Escape enter command mode
Escape + d + d delete selected cell
Escape + y change cell to code
Escape + m change cell to markdown
Escape + r change cell to raw
Escape + 1 change cell to Heading 1
Escape + n change cell to heading n
Escape + b create cell below
Escape + a Insert cell above
Execute Cells
Kernel Cells
Widgets
Help
Saving/Loading Notebook
Edit Cells
Magic Commands
View Cells
Insert Cells
Run Selected
Cells
Run Current
Cells down &
create one
below
Run all Cells
Run Current
Cells down &
create one
above
Run all Cells
above the
current one
Run all Cells
below current
one
Change the
cell type
Toggle & clear
current
outputs Toggle & clear
all outputs
Close Notebook &
stop running scripts
Interrupt
kernel
Restart
Kernel Interrupt kernel
& Clear all
output
Restart Kernel
& Run all cells Reconnect to
a remote
Notebook
Shutdown all
cells
Run other
installed kernels
Save
Notebook
with
Interactive
widget
Clear
Notebook
with
Interactive
widget Download
all widget
models in
use
Embed
current
widgets
Cut the selected cells
to Clipboard
Copy cells from
Clipboard to current
position Paste cells above
current cell
Paste cells below
current cell Paste cells on top of
current cell
Delete cells
Revert ‘Delete cells’
invocation
Split up cell from
current position Merge current cell
with above
Merge current cell
with below
Move current cell up
Move current cell
down Adjust Metadata
underlying the
current Notebook
Find and replace in
selected cells
Remove cell
attachments
Copy attachments of
current cell Paste attachments of
current cell
Insert image in
selected cells
Toggle display
of Jupyter logo
& Filename
Toggle display
of Toolbar
Toggle line
numbers in
cell
Toggle display
of cell action
icons
Add new cell
above the
current one
Add new cell
below the
current one
Walk
through a
UI Tour
Built-in
keyboard
shortcuts
Notebook
help topics
Edit the
Built-in
keyboard
shortcuts
Markdown
available in
Notebook
Python help
topics
IPython
help topics
NumPy
help topics
SciPy help
topics
Matplotlib
help topics SymPy help
topics
Pandas
help topics
About
Jupyter
Notebook