You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Jupyter Notebook is an open-source web application that lets you create and share documents containing live code, equations, visualisations, and narrative text. It is the standard interactive development environment for data science, and you will use it throughout this course.
The name "Jupyter" stands for the three core programming languages it was designed to support: Julia, Python, and R. Today, Jupyter supports over 40 languages through different kernels, but Python remains the most popular.
A Jupyter notebook is a .ipynb file (IPython Notebook) that consists of an ordered list of cells. Each cell can contain:
If you don't already have Python installed, download it from python.org or use a package manager:
# macOS (Homebrew)
brew install python
# Ubuntu/Debian
sudo apt update && sudo apt install python3 python3-pip
# Windows — download the installer from python.org
Verify your installation:
python3 --version
# Python 3.12.x (or similar)
It is best practice to create an isolated environment for your data science projects:
# Create a virtual environment
python3 -m venv datasci-env
# Activate it
# macOS/Linux:
source datasci-env/bin/activate
# Windows:
datasci-env\Scripts\activate
pip install jupyter numpy pandas matplotlib seaborn scikit-learn
jupyter notebook
This opens your default browser with the Jupyter dashboard at http://localhost:8888.
If you prefer not to install anything locally, Google Colab provides free cloud-based Jupyter notebooks:
Google Colab is an excellent option for beginners and for working on machines where you cannot install software.
When you launch Jupyter, you see a file browser. From here you can:
New > Python 3).ipynb filesA notebook has two main areas:
Code cells contain Python code. Press Shift + Enter to execute a cell and move to the next one.
# This is a code cell
x = 42
print(f"The answer is {x}")
Output:
The answer is 42
Markdown cells contain formatted text. Change a cell to Markdown mode and press Shift + Enter to render it.
# This is a Heading
This is **bold** and this is *italic*.
- Bullet point 1
- Bullet point 2
```python
# Code can be displayed (but not executed) in Markdown
print("hello")
### Cell Operations
| Action | Shortcut |
|--------|----------|
| Run cell and move to next | `Shift + Enter` |
| Run cell and stay | `Ctrl + Enter` |
| Insert cell above | `A` (in command mode) |
| Insert cell below | `B` (in command mode) |
| Delete cell | `D, D` (press D twice in command mode) |
| Change to code cell | `Y` (in command mode) |
| Change to markdown cell | `M` (in command mode) |
| Enter command mode | `Escape` |
| Enter edit mode | `Enter` |
| Save notebook | `Ctrl + S` |
---
## Command Mode vs Edit Mode
Jupyter has two modes:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.