Keyboard Shortcuts Every Data Scientist Should Know
Published: July 8, 2026 · 9 min read
A working data scientist touches four or five tools every day — a notebook, an editor, a terminal, Git, and usually a browser-based runtime like Colab. You don't need hundreds of shortcuts; you need the right thirty. If you learn nothing else from this page, learn these five: Shift+Enter (run cell), Esc / Enter (switch Jupyter modes), Ctrl+R (search shell history), Ctrl+Shift+P (VS Code command palette), and Tab (autocomplete everywhere). The rest of this guide organizes the full set by tool.
Table of Contents
Which Jupyter Notebook shortcuts matter most?
Jupyter's whole shortcut system hinges on one idea: two modes. In edit mode (green border) you type code; in command mode (blue border) single letters manipulate cells. Esc takes you to command mode, Enter drops back into editing. Once that's reflex, cell surgery becomes wordless:
| Shortcut | What it does |
|---|---|
| Shift + Enter | Run the cell and select the next one |
| Ctrl + Enter | Run the cell and stay on it |
| Alt + Enter | Run the cell and insert a new one below |
| Esc / Enter | Command mode / edit mode |
| A / B | Insert a cell above / below (command mode) |
| DD | Delete the cell (press D twice) |
| M / Y | Convert to Markdown / code cell |
| C / X / V | Copy / cut / paste a cell |
| Tab | Autocomplete in edit mode |
| Ctrl + / | Toggle comment |
Ctrl+Enter re-runs a cell in place — ideal when tuning one plot — while Shift+Enter advances, which is what you want when executing a notebook top to bottom.What are the Google Colab equivalents?
Colab keeps the run keys identical but wraps cell commands behind a Ctrl+M prefix (press Ctrl+M, release, then the letter) so they don't collide with browser shortcuts:
| Shortcut | What it does |
|---|---|
| Ctrl + Enter / Shift + Enter / Alt + Enter | Same as Jupyter: run, run & advance, run & insert |
| Ctrl + Shift + Enter | Run all cells |
| Ctrl + M, B | Add a code cell below |
| Ctrl + M, A | Add a code cell above |
| Ctrl + M, D | Delete the current cell |
| Ctrl + M, M / Ctrl + M, Y | Convert to text / code cell |
| Ctrl + M, Up/Down | Move the cell up / down |
| Ctrl + / | Toggle comment |
If you move between the two daily, the mapping to remember is simple: Jupyter's single letter = Colab's Ctrl+M plus that letter. B becomes Ctrl+M, B, D D becomes Ctrl+M, D, and so on.
Which VS Code shortcuts speed up notebook and script work?
VS Code's notebook interface honors the Jupyter keys above (Esc/Enter modes, A, B, DD all work), so what's left to learn are the editor moves that notebooks don't teach you:
| Shortcut | What it does |
|---|---|
| Ctrl + P | Jump to any file by name |
| Ctrl + Shift + P | Command Palette — every command, searchable |
| Ctrl + D | Select next occurrence — rename a variable in seconds |
| Alt + Up/Down | Move a line or selection |
| Ctrl + / | Toggle comment |
| Ctrl + ` | Toggle the integrated terminal |
| Ctrl + Shift + F | Search across the whole project |
| F12 | Go to definition of a function |
Ctrl+D deserves special mention for data work: click a DataFrame column name, hammer Ctrl+D a few times, and rename every occurrence at once without a find-and-replace dialog.
What terminal and Git shortcuts save the most time?
Data scientists live in the shell more than they expect — environment activation, pip installs, ssh to training boxes. These keys compound daily:
| Shortcut | What it does |
|---|---|
| Ctrl + R | Reverse-search command history — retype nothing, ever |
| Ctrl + A / Ctrl + E | Jump to the start / end of the line |
| Ctrl + U / Ctrl + K | Delete to line start / end |
| Ctrl + L | Clear the screen |
| Ctrl + C / Ctrl + D | Kill the process / exit the shell |
| !! | Repeat the last command (e.g., sudo !!) |
| cd - | Return to the previous directory |
On the Git side, the muscle-memory loop is git status → git add -p (stage hunks interactively — underrated for keeping notebook diffs clean) → git commit → git log --oneline, with git stash for the “the meeting is starting” moments. Full lists live in our Git cheat sheet and Bash commands reference.
How do you practice until they stick?
Pick five shortcuts from this page — not thirty — and force yourself to use them for one week before adding more. For deliberate practice, our free Shortcut Speedrun game includes Jupyter, VS Code, and terminal rounds with a global leaderboard. And since the data-science stack spans several tools, you can build one combined printable sheet with the My Stack builder: select Jupyter + VS Code + Git + Bash + Colab and print a single reference for your desk.
Frequently asked questions
What is the most important Jupyter Notebook shortcut?
Shift+Enter, which runs the current cell and selects the next one. Combined with Esc and Enter for switching between command and edit mode, it covers the core notebook workflow.
What is the difference between Ctrl+Enter and Shift+Enter in Jupyter?
Ctrl+Enter runs the cell and keeps it selected, which is ideal for iterating on one cell. Shift+Enter runs the cell and moves to the next one, which is better for executing a notebook top to bottom.
Why does Google Colab use Ctrl+M for cell shortcuts?
Colab runs in the browser, where single-letter shortcuts would conflict with page and browser keys. The Ctrl+M prefix namespaces Jupyter-style commands: Ctrl+M then B adds a cell below, Ctrl+M then D deletes the cell.
Do Jupyter shortcuts work in JupyterLab and VS Code notebooks?
Largely yes. Both keep the command/edit mode model and the core keys such as Esc, Enter, A, B, DD, M, and Y. Interface-level shortcuts for panels and tabs differ, but cell-editing muscle memory transfers.