Jupyter Notebook Keyboard Shortcuts, new thread
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👌" title="Ok hand" aria-label="Emoji: Ok hand">!
We& #39;re trying to make this interactive; if you& #39;re on desktop, fork this project and follow along: https://notebooks.ai/rmotr-curriculum/interactive-jupyterlab-tutorial
https://notebooks.ai/rmotr-cur... class="Emoji" style="height:16px;" src=" https://abs.twimg.com/emoji/v2/... draggable="false" alt="✅" title="Fettes weißes Häkchen" aria-label="Emoji: Fettes weißes Häkchen"> Words with *stars* are concepts.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="✅" title="Fettes weißes Häkchen" aria-label="Emoji: Fettes weißes Häkchen"> Words with [brackets] are keystrokes.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👇" title="Rückhand Zeigefinger nach unten" aria-label="Emoji: Rückhand Zeigefinger nach unten">
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👇" title="Rückhand Zeigefinger nach unten" aria-label="Emoji: Rückhand Zeigefinger nach unten">
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👇" title="Rückhand Zeigefinger nach unten" aria-label="Emoji: Rückhand Zeigefinger nach unten">
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👇" title="Rückhand Zeigefinger nach unten" aria-label="Emoji: Rückhand Zeigefinger nach unten">
https://abs.twimg.com/emoji/v2/... draggable="false" alt="👇" title="Rückhand Zeigefinger nach unten" aria-label="Emoji: Rückhand Zeigefinger nach unten">
We& #39;re trying to make this interactive; if you& #39;re on desktop, fork this project and follow along: https://notebooks.ai/rmotr-curriculum/interactive-jupyterlab-tutorial
First off:
A Jupyter Notebook is an interactive code environment. It supports multiple languages, but the most common one is Python
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🐍" title="Schlange" aria-label="Emoji: Schlange">. We write code in *cells*, and the execution provides immediate feedback
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🏃♀️" title="Läuferin" aria-label="Emoji: Läuferin">:
A Jupyter Notebook is an interactive code environment. It supports multiple languages, but the most common one is Python
One thing that confuse beginners is that Notebooks have two different *modes*
https://abs.twimg.com/emoji/v2/... draggable="false" alt="🚦" title="Vertikale Verkehrsampel" aria-label="Emoji: Vertikale Verkehrsampel">:
https://abs.twimg.com/emoji/v2/... draggable="false" alt="✍️" title="Schreibende Hand" aria-label="Emoji: Schreibende Hand"> Edit mode: To write code.
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⚡️" title="Hochspannungszeichen" aria-label="Emoji: Hochspannungszeichen"> Command mode: run commands (this thread)
It& #39;s easy to differentiate them:
* In command mode
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⚡️" title="Hochspannungszeichen" aria-label="Emoji: Hochspannungszeichen"> the cell is greyed out
* In edit mode
https://abs.twimg.com/emoji/v2/... draggable="false" alt="✍️" title="Schreibende Hand" aria-label="Emoji: Schreibende Hand"> the cursor is blinking
It& #39;s easy to differentiate them:
* In command mode
* In edit mode
To switch modes, we& #39;ll use:
* The [ESCAPE] key to go to
https://abs.twimg.com/emoji/v2/... draggable="false" alt="⚡️" title="Hochspannungszeichen" aria-label="Emoji: Hochspannungszeichen"> command mode
* The [RETURN] key to go to
https://abs.twimg.com/emoji/v2/... draggable="false" alt="✍️" title="Schreibende Hand" aria-label="Emoji: Schreibende Hand"> edit mode.
* The [ESCAPE] key to go to
* The [RETURN] key to go to
The following tweets assume you& #39;re in
On
* [UP] arrow key to navigate to cells above
* [DOWN] arrow key to navigate cells below
(If you& #39;re a vim user, you can also navigate with [J] & [K])
* Press [A] to create a cell "[A]bove" the current selected cell
* Press [B] to create a cell "[B]elow" the current cell
Use the [UP] and [DOWN] arrow keys to move to the cell that you want to delete and hit the [D] key *2 times*. You have to chain the key presses quickly: [D] [D]
Did you incorrectly delete a cell
(To remember this shortcut, think about ctrl+[Z])
(this works on both edit
To execute code, keep the [CTRL] key pressed, and hit the [RETURN] key. The shortcut is: [CTRL + RETURN]
Extra
On
(remember this command because of ctrl+c & ctrl+v).
On
* Hit the [M] key to switch to [M]arkdown mode
* Hit the [Y] key to go back to p[Y]thon code
Did you get stuck on an infinite loop
Hit the [I] key two times to [I]nterrupt the kernel. Chain the two key presses quickly: [I] [I]
(similar to the delete command we saw before).
Sometimes, there& #39;s no other way than just restarting the whole kernel. Similar to Interrupt, hit the [0] (zero) key two times quickly: [0] [0] (again, that& #39;s a zero).
(this is an less known feature
Select the cells that you want to merge and, while maintaining [SHIFT] pressed, hit the [M] key: [SHIFT + M]
Isn& #39;t that amazing?
Useful trick: if you ever forget any of these commands
https://abs.twimg.com/emoji/v2/... draggable="false" alt="😢" title="Weinendes Gesicht" aria-label="Emoji: Weinendes Gesicht">, use the command palette to search for them. The keyboard shortcut will appear next to the command
https://abs.twimg.com/emoji/v2/... draggable="false" alt="😁" title="Grinsendes Gesicht mit lächelnden Augen" aria-label="Emoji: Grinsendes Gesicht mit lächelnden Augen">.