Jupyter Notebook is widely used most popular tool for data science and machine learning solution development.
Starting with IPython 2.0, the Jupyter Notebook has two modes:
- edit mode
- command mode.
Keyboard will behave differently depending upon which mode you have selected.
Command mode
Grey cell border is a sign that command mode is enabled. In command mode, we can edit the notebook as a whole, but not type into individual cells. The keyboard is mapped to a set of shortcuts that let you perform notebook and cell actions efficiently. You can enter command mode by pressing Esc or using the mouse to click outside a cell’s editor area.
Following table shows some of important shortcuts for command mode;
Command | Description |
---|---|
Enter | enter into edit mode |
Shift-Enter | run current cell, and select cell below |
Ctrl-Enter | run cell |
Alt-Enter | run cell, insert below |
Y | to code |
M | to markdown |
R | to raw code |
1 | to insert heading 1 |
2,3,4,5,6 | to insert heading 2,3,4,5,6 |
K | select cell above |
J | select cell below |
A | insert cell above |
B | insert cell below |
X | cut selected cell |
C | copy selected cell |
Shift-V | paste cell above |
V | paste cell below |
Z | undo last cell deletion |
D,D | delete selected cell |
Shift-M | merge cell below |
Ctrl-S | Save and Checkpoint |
L | toggle line numbers |
O | toggle output |
Shift-O | toggle output scrolling |
Esc | close pager |
H | show keyboard shortcut help dialog |
I,I | interrupt kernel |
0,0 | restart kernel |
Space | scroll down |
Shift-Space | scroll up |
Shift | ignore |
Many data scientists Datalya have above shortcuts in printed form sitting next to their keyboards :)
Python For Kids
Don't forget to checkout Python For Kids and Free Teaching Material article. You can download slides of 3 weeks course, delivered by Datalya with help of Dr Nasir.
Download Free Learning Material