All Articles

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

  1. Jupyter Notebook shortcuts
  2. Google Colab equivalents
  3. VS Code for notebooks and scripts
  4. Terminal and Git
  5. Making them stick
  6. FAQ

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:

ShortcutWhat it does
Shift + EnterRun the cell and select the next one
Ctrl + EnterRun the cell and stay on it
Alt + EnterRun the cell and insert a new one below
Esc / EnterCommand mode / edit mode
A / BInsert a cell above / below (command mode)
DDDelete the cell (press D twice)
M / YConvert to Markdown / code cell
C / X / VCopy / cut / paste a cell
TabAutocomplete in edit mode
Ctrl + /Toggle comment
The interview classic: 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:

ShortcutWhat it does
Ctrl + Enter / Shift + Enter / Alt + EnterSame as Jupyter: run, run & advance, run & insert
Ctrl + Shift + EnterRun all cells
Ctrl + M, BAdd a code cell below
Ctrl + M, AAdd a code cell above
Ctrl + M, DDelete the current cell
Ctrl + M, M / Ctrl + M, YConvert to text / code cell
Ctrl + M, Up/DownMove 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:

ShortcutWhat it does
Ctrl + PJump to any file by name
Ctrl + Shift + PCommand Palette — every command, searchable
Ctrl + DSelect next occurrence — rename a variable in seconds
Alt + Up/DownMove a line or selection
Ctrl + /Toggle comment
Ctrl + `Toggle the integrated terminal
Ctrl + Shift + FSearch across the whole project
F12Go 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:

ShortcutWhat it does
Ctrl + RReverse-search command history — retype nothing, ever
Ctrl + A / Ctrl + EJump to the start / end of the line
Ctrl + U / Ctrl + KDelete to line start / end
Ctrl + LClear the screen
Ctrl + C / Ctrl + DKill 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 statusgit add -p (stage hunks interactively — underrated for keeping notebook diffs clean) → git commitgit 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.

Full interactive references

Jupyter Shortcuts Colab Shortcuts

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.