Key Takeaways: Setting Up Your Toolkit
This is your reference card for Chapter 2. Keep it handy during the first few weeks — you'll look up keyboard shortcuts more often than you think.
Installation Checklist
If you need to verify your setup (or help someone else with theirs), work through this list:
- [ ] Anaconda downloaded and installed from anaconda.com
- [ ] Anaconda Navigator opens without errors
- [ ]
python --versionin terminal/Anaconda Prompt shows Python 3.x - [ ]
jupyter --versionshows Jupyter version information - [ ]
conda --versionshows conda version information - [ ]
conda listshows installed packages (look for numpy, pandas, matplotlib) - [ ]
jupyter notebooklaunches the notebook server and opens the dashboard in your browser - [ ] You can create a new Python 3 notebook from the dashboard
- [ ] You can run a code cell with
print("Hello!")and see output
If any step fails, refer to the troubleshooting sections in Section 2.2 of the chapter, or use Google Colab (colab.research.google.com) as a fallback.
The Jupyter Interface at a Glance
+---------------------------------------------------------------+
| Notebook Title (click to rename) |
+---------------------------------------------------------------+
| File | Edit | View | Insert | Cell | Kernel | Help |
+---------------------------------------------------------------+
| [Save] [+] [Cut] [Copy] [Paste] [Up] [Down] [Run] | Code v |
+---------------------------------------------------------------+
| |
| In [1]: | print("Hello, world!") |
| | |
| | Hello, world! |
| |
| In [2]: | 2 + 3 |
| | |
| Out[2]: | 5 |
| |
+---------------------------------------------------------------+
- Cells are the building blocks. Everything happens inside cells.
- Code cells have
In [ ]:labels and contain Python code. - Markdown cells have no
In [ ]:label and contain formatted text. - The kernel runs in the background and executes your code.
- The notebook server runs in a terminal window — don't close it.
Keyboard Shortcuts — Quick Reference
Switching Modes
| Action | Key |
|---|---|
| Enter command mode (cell-level operations) | Esc |
| Enter edit mode (type inside a cell) | Enter |
Running Cells
| Action | Key | When to Use |
|---|---|---|
| Run cell, move to next | Shift+Enter | Default — your most-used shortcut |
| Run cell, stay on it | Ctrl+Enter | When tweaking one cell repeatedly |
| Run cell, insert new below | Alt+Enter | When you know you need a new cell next |
Cell Operations (Command Mode — press Esc first)
| Action | Key |
|---|---|
| Insert cell above | A |
| Insert cell below | B |
| Delete cell | D, D (press D twice) |
| Cut cell | X |
| Copy cell | C |
| Paste cell below | V |
| Undo cell operation | Z |
| Convert to Markdown | M |
| Convert to code | Y |
| Toggle line numbers | L |
Editing (Edit Mode — inside a cell)
| Action | Key |
|---|---|
| Autocomplete | Tab |
| Show documentation | Shift+Tab |
| Split cell at cursor | Ctrl+Shift+- |
Markdown Syntax Guide
| Element | Syntax | Rendered As |
|---|---|---|
| Heading 1 | # Title |
Large heading |
| Heading 2 | ## Subtitle |
Medium heading |
| Heading 3 | ### Section |
Small heading |
| Bold | **text** |
text |
| Italic | *text* |
text |
| Bold italic | ***text*** |
text |
| Unordered list | - item |
Bulleted item |
| Ordered list | 1. item |
Numbered item |
| Link | [label](url) |
Clickable link |
| Inline code | `code` |
Monospaced text |
| Block quote | > text |
Indented quote |
| Horizontal rule | --- |
Divider line |
| Code block | ```python |
Syntax-highlighted block |
The notebook rhythm: Markdown (explain), Code (compute), Markdown (interpret), Code (compute), ...
Key Terms at a Glance
| Term | One-Line Definition |
|---|---|
| Python | The programming language — general-purpose, readable, widely used in data science |
| Anaconda | The all-in-one installer — Python + Jupyter + data science libraries |
| Jupyter notebook | The interactive document — code + text + output in one file |
| Kernel | The engine — executes your Python code behind the scenes |
| Code cell | Where you write and run Python |
| Markdown cell | Where you write formatted explanations |
| Cell execution | Running a cell — sends code to kernel or renders Markdown |
| Notebook server | The background process that makes Jupyter work — don't close its terminal |
| Cell output | What appears below a cell after you run it |
| Restart kernel | Clear the kernel's memory — all variables forgotten, fresh start |
| Command mode | Notebook-level mode (Esc) — for creating, deleting, moving cells |
| Edit mode | Cell-level mode (Enter) — for typing code or text inside a cell |
| Terminal | Text-based interface for your operating system |
| Environment | A self-contained set of Python packages and versions |
Notebook Best Practices Summary
- Start with a title cell — Markdown with heading, author, date, purpose
- Use section headings —
##for major sections,###for subsections - Explain before you compute — Markdown cell before code, interpretation after
- Name files descriptively —
sales-analysis-jan-2024.ipynb, notUntitled3.ipynb - Avoid spaces in filenames — use hyphens or underscores
- Keep a folder structure — one folder per project, with subfolders for data and notebooks
- Restart & Run All regularly — catches out-of-order dependencies
- Comment your code — use
#for brief inline explanations - One logical step per cell — don't cram everything into one giant cell
- Save often — Ctrl+S / Cmd+S
What You Should Be Able to Do Now
Use this checklist to verify you've absorbed the chapter. If any item feels shaky, revisit the relevant section before moving on to Chapter 3.
- [ ] Install Anaconda and verify that Python, Jupyter, and conda are working
- [ ] Launch Jupyter Notebook from Anaconda Navigator or the terminal
- [ ] Create, rename, and save a new notebook
- [ ] Write and run code cells — use
print(), do arithmetic, understand cell output - [ ] Write and run Markdown cells — create headings, bold, italic, lists, links
- [ ] Switch between cell types — use the dropdown or M/Y shortcuts
- [ ] Use keyboard shortcuts — at minimum: Shift+Enter, Esc, Enter, A, B, D-D, M, Y
- [ ] Explain what a kernel is and what "Restart & Run All" does
- [ ] Organize a notebook with title, sections, explanations, and a logical flow
- [ ] Create your project notebook with title, research questions, and section headers
If you checked every box, you're ready for Chapter 3. Your toolkit is set up, your notebook is waiting, and you've proven that you can write and run Python code. From here, everything builds. Let's go learn Python properly.