Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Jupyter Notebook Cheat Sheet, Cheat Sheet of Programming Languages

In this document we have an overview on Jupyter Notebook, an open-source web application that allows you to create and share documents, with the main shortcuts and commands.

Typology: Cheat Sheet

2019/2020

Uploaded on 10/09/2020

anamika
anamika 🇺🇸

4.7

(15)

254 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Statement
Explanation Example
%magic
Comprehensively lists and
explains magic functions
%magic
%
automa
gic
When active, enables you
to call magic functions
without the ‘%’
%
automagic
%
quickref Launch IPython quick
reference
%quickref
%pastebin
Pastebins lines from
your current session.
%
pastebin 3
18
-20 ~1/1-5
%debug
Enters the interactive
debugger
%debug
%hist
Print command input
and output history
%
hist
%pdb
Automatically enter python
debugger after any
exception
%
pdb
%cpaste
Opens up a special prompt
for manually pasting Python
code for execution
%
cpaste
%reset
Delete all variables and
names defined in the
current namespace
%reset
%run
Run a python script
inside a notebook
%run script.py
%who,
%who_ls,
%whos
Display variables defined in
the interactive namespace,
with
varying levels of verbosity
%who,
%
who_ls,
%
whos
%xdel
Delete a variable in the
local namespace. Clear any
references to that variable
%
xdel
variable
%time
Times a single statement
In [561]: %time
method = [a for
a in data if
b.startswith(‘htt
p’)]
JUPYTER NOTEBOOK CHEAT SHEET Learn PYTHON from experts at https://www.edureka.co
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 -Den 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

Partial preview of the text

Download Jupyter Notebook Cheat Sheet and more Cheat Sheet Programming Languages in PDF only on Docsity!

Statement Explanation Example

%magic

Comprehensively lists and

explains magic functions

%magic

%automa

gic

When active, enables you

to call magic functions

without the ‘%’

%automagic

%quickref

Launch IPython quick

reference

%quickref

%pastebin

Pastebins lines from

your current session.

%pastebin 3

%debug

Enters the interactive

debugger

%debug

%hist

Print command input

and output history

%hist

%pdb

Automatically enter python

debugger after any

exception

%pdb

%cpaste

Opens up a special prompt

for manually pasting Python

code for execution

%cpaste

%reset

Delete all variables and

names defined in the

current namespace

%reset

%run

Run a python script

inside a notebook

%run script.py

%who,

%who_ls,

%whos

Display variables defined in

the interactive namespace,

with

varying levels of verbosity

%who,

%who_ls,

%whos

%xdel

Delete a variable in the

local namespace. Clear any

references to that variable

%xdel variable

%time Times a single statement

In [561]: %time

method = [a for

a in data if

b.startswith(‘htt

p’)]

JUPYTER NOTEBOOK CHEAT SHEET

Learn PYTHON from experts at https://www.edureka.co

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

Built-in Exceptions User - Defined 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

Toggle & clear cell type

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

Copy cells from to Clipboard

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

Find and replace in current Notebook

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