|
Up/Down Arrow Keys
|
Navigate Cells
|
|
A
|
Insert Cell Above
|
|
B
|
Insert Cell Below
|
|
Shift Tab
|
Docstring for object. Press again to cycle docstring type
|
|
F
|
Find and Replace
|
|
O
|
Toggle Output
|
|
Shift Up/Down Arrows
|
Select Cells Above/Below
|
|
Shift M
|
Merge Multiple Cells
|
|
Ctrl Shift -
|
Split cell
|
|
y
|
Change to code
|
|
m
|
Change to markdown
|
|
Number 1-6
|
Change to heading
|
|
c
|
Copy a cell
|
|
x
|
Cut a cell
|
|
Shift
|
Run Cell and Select Below
|
|
Alt
|
Run Cell and Insert below
|
|
Ctrl
|
Run Cell and stay on same cell
|
|
ii
|
Interupt
|
|
00
|
Restart
|
|
a
|
Select all
|
|
z
|
Undo
|
|
Shift Z
|
Redo
|
|
]
|
Indent
|
|
[
|
Dedent
|
|
jupyter nbconvert --to script NOTEBOOK_NAME.ipynb
|
Convert to other formats (script converts to Python)
|
|
from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all"
|
Multiple outputs in the same cell
|
|
from IPython.core.display import display, HTML display(HTML("<style>.container { width:95% !important; }</style>"))
|
Change width of current notebook
|
|
import sys !{sys.executable} -m pip install numpy
|
Import package in current notebook
|
|
%%time
|
Place at the top of a cell to check how long the cell takes to execute
|
|
%%heat
|
Place at the top of a cell to check how long each line of code takes to execute
|
|
%%bash
|
Run cells as bash script
|
|
%lsmagic, %quickref
|
List all available magic commands, describe magic commands
|
|
%pastebin x-y
|
Create a url code from current Jupyter Notebook cell x to y
|
|
%whos
|
Returns the variables present in the global space along with its type. Pass arguments to return variables of a specific type
|
|
%automagic
|
Make magic functions callable without having to type the initial %.
|
|
%pdb, %pdb off
|
Control automatic calling of the pdb interactive debugger.
|
|
%pip
|
Install the python module using the pip package manager in the jupyter notebook
|
|
%dhist
|
History of directories visited in the notebook
|
|
%history
|
The history of commands which were executed in a notebook.
|
|
%precision
|
Sets the precision of floating point numbers
|
|
%run ./swarm.ipynb
|
Lets us run the python file or a different jupyter notebook file in the jupyter notebook
|
|
%env
|
Set Environment Variables You can manage environment variables of your notebook without restarting the jupyter server process
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.