Jupyter Notebook Notebook shortcuts
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
Concepts
- Command mode keys act on cells
- Edit mode keys type into a cell
- Command mode back to cells
Modes & Running
Navigate & Select
Cells
Cell Types
Kernel & Palette
| Menu item | Effect |
|---|---|
| Interrupt | Stop a running cell |
| Restart | Fresh process, state lost |
| Restart and Run All | Clean top-to-bottom check |
| Change Kernel | Switch environment |
Magics
%timeit <expr>
%%time%%bash!<cmd>%matplotlib inline
%load_ext autoreload
%who%run <file.py>
%pip install <pkg>
%lsmagic<name>?CLI
jupyter notebook
jupyter labjupyter nbconvert --to <fmt> <nb>
jupyter nbconvert --execute --to notebook <nb>
jupyter kernelspec list
python -m ipykernel install --user --name <env>
jupyter kernelspec remove <name>
jupyter notebook list
jupyter --pathsjupyter notebook --no-browser --port <n>
Recipes
python -m venv .venvsource .venv/bin/activatepip install ipykernelpython -m ipykernel install --user --name myenv
jupyter nbconvert --to script analysis.ipynb# writes analysis.py
# on the serverjupyter notebook --no-browser --port 8888# on your laptopssh -L 8888:localhost:8888 <user>@<host>
%load_ext autoreload%autoreload 2



