Finance Train
Menu

Getting Started with Jupyter Notebooks

January 3, 2026 · 5 min read

Getting Started with Jupyter Notebooks

Jupyter notebooks are the standard tool for interactive data science work. They let you write code, see results immediately, add explanations, and share your analysis - all in one document. If you’re learning Python or R for data work, you’ll spend a lot of time in Jupyter.

What is a Jupyter Notebook?

A Jupyter notebook is an interactive document that combines:

  • Code cells - Write and run Python or R code
  • Output - See results, charts, and tables inline
  • Markdown cells - Add formatted text, explanations, and documentation
  • Rich media - Display images, HTML, and interactive widgets

The name “Jupyter” comes from Julia, Python, and R - the three languages it originally supported. Today it works with dozens of languages, but Python is most common.

Why Use Notebooks?

Exploratory analysis. When you’re investigating data, you want to try things quickly and see results. Notebooks let you run code in chunks, inspect outputs, and iterate fast.

Documentation built-in. You can explain your thinking alongside your code. This makes notebooks great for sharing analysis with colleagues who want to understand your approach.

Visualization inline. Charts and plots appear right below the code that generated them. No switching between windows.

Reproducibility. A notebook captures your entire analysis workflow. Others can run it and get the same results.

Installing Jupyter

Anaconda includes Jupyter, Python, and common data science packages:

  1. Download Anaconda from anaconda.com
  2. Run the installer
  3. Open Anaconda Navigator and launch Jupyter Notebook

Option 2: With pip

If you already have Python installed:

pip install jupyter

Then run:

jupyter notebook

Option 3: JupyterLab

JupyterLab is the newer interface with more features:

pip install jupyterlab
jupyter lab

The Interface

When you launch Jupyter, it opens in your web browser. You’ll see:

File browser - Navigate your folders and open notebooks (.ipynb files)

Notebook view - The main editing area with cells

Toolbar - Buttons for common actions (run, stop, save)

Kernel indicator - Shows whether code is running

Working with Cells

Notebooks are made of cells. Each cell is either:

Code Cells

Type Python code and press Shift+Enter to run:

import pandas as pd
df = pd.read_csv('data.csv')
df.head()

The output appears directly below the cell.

Markdown Cells

Write formatted text using Markdown syntax:

## Analysis Summary

This section explores the **key findings** from our data:

- Finding 1
- Finding 2
- Finding 3

Press Shift+Enter to render the formatted text.

Essential Keyboard Shortcuts

These will speed up your work significantly:

ActionShortcut
Run cellShift + Enter
Run cell, stay in placeCtrl + Enter
Insert cell belowB (in command mode)
Insert cell aboveA (in command mode)
Delete cellDD (in command mode)
Switch to MarkdownM (in command mode)
Switch to CodeY (in command mode)
Enter command modeEsc
Enter edit modeEnter

Command mode (blue cell border): Navigate and manipulate cells Edit mode (green cell border): Type in a cell

Best Practices

Keep cells focused

Each cell should do one thing. This makes debugging easier and helps readers follow your logic.

# Good: One operation per cell
df = pd.read_csv('sales.csv')
df['total'] = df['quantity'] * df['price']
df.groupby('region')['total'].sum()

Add Markdown explanations

Don’t just show code - explain what you’re doing and why:

## Data Cleaning

The raw data has several issues we need to address:
- Missing values in the 'region' column
- Duplicate transaction IDs
- Negative quantities (likely returns)

Restart and run all

Before sharing, restart the kernel and run all cells from top to bottom. This catches issues where cells depend on deleted code or out-of-order execution.

Kernel > Restart & Run All

Use meaningful names

Name your notebooks descriptively:

  • Good: 2024-01-sales-analysis.ipynb
  • Bad: Untitled.ipynb

Common Patterns

Data exploration workflow

# Load data
import pandas as pd
df = pd.read_csv('data.csv')

# Quick look
df.head()
# Shape and types
print(f"Rows: {len(df)}, Columns: {len(df.columns)}")
df.dtypes
# Summary statistics
df.describe()
# Check for missing values
df.isnull().sum()

Visualization

import matplotlib.pyplot as plt

# Enable inline plots
%matplotlib inline

# Create a chart
df['category'].value_counts().plot(kind='bar')
plt.title('Sales by Category')
plt.show()

Suppress output

Add a semicolon to prevent output:

fig, ax = plt.subplots(figsize=(10, 6));  # No extra output

Notebooks vs Scripts

Use notebooks for:

  • Exploratory analysis
  • Learning and experimentation
  • Sharing analysis with explanations
  • Quick prototyping

Use scripts (.py files) for:

  • Production code
  • Reusable functions and modules
  • Automation
  • Version control (notebooks don’t diff well)

Many data scientists prototype in notebooks, then move finalized code to scripts.

JupyterLab vs Classic Notebook

Classic Notebook - Simpler, one notebook at a time, lighter weight

JupyterLab - Multiple tabs, file browser, terminal, more IDE-like

Both work with the same .ipynb files. JupyterLab is the direction Jupyter is heading, but classic notebooks are still widely used.

Next Steps

  1. Install Jupyter using one of the methods above
  2. Create a new notebook and run some basic Python
  3. Load a dataset with pandas and explore it
  4. Add Markdown to document your analysis
  5. Practice shortcuts until they’re automatic

Notebooks are a tool - the more you use them, the more natural they become. Start simple, and you’ll develop your own workflow over time.