What Is a Jupyter Notebook and How Do You Use It?
A plain-English first session for analysts moving from spreadsheets to Python: what a Jupyter notebook is, how to open one and how to load and explore your first file.
A Jupyter notebook is a document that mixes runnable code, results, charts and written notes in one file, saved with an .ipynb extension. You write Python in small cells, run them one at a time and see each output right below. Analysts use notebooks to explore data, test ideas and share repeatable analysis instead of one-off spreadsheets.
Photo: Unsplash
On this page
You’ve hit the limits of your spreadsheet. Maybe the file has 2 million rows and keeps crashing. Maybe you rebuild the same monthly report by hand, clicking through the same 40 steps. Or maybe a colleague sent you a file ending in .ipynb and you’re not sure what to do with it.
That file is a Jupyter notebook, and it’s the most common way analysts take their first steps with Python. This guide explains what a notebook is, how to get one running in a few minutes and what your first real session should look like if you’re coming from Excel or Google Sheets.
What a Jupyter notebook is
A Jupyter notebook is a document that combines 4 things in one place:
- Code you can run, usually Python
- Outputs from that code, such as tables, numbers and error messages
- Charts and other visuals
- Written notes in Markdown, such as headings, explanations and bullet points
Project Jupyter’s documentation describes a notebook as a document that mixes explanatory text, code, images and outputs. You run the code in small pieces called cells, and each result appears directly below its cell.
The name comes from the 3 languages the project originally supported: Julia, Python and R. Python is by far the most common choice for business analysis today. The project grew out of IPython, an enhanced interactive Python shell that still powers the default Python kernel.
Notebooks are saved as .ipynb files. Under the hood, these are structured JSON documents that store your cells, their outputs and some metadata. That’s why opening one in a plain text editor looks messy, but opening it in a notebook tool looks clean.
How notebooks work: cells and kernels
2 ideas make notebooks click.
Cells. A notebook is a list of cells. A code cell holds code you can run. A Markdown cell holds formatted text. You run a cell with Shift + Enter, see the result and move to the next one.
The kernel. Behind every open notebook is a kernel, a separate process that runs your code and remembers your variables. Load a file in cell 1, and the data stays in memory for cells 2, 3 and 4. Restart the kernel and that memory is wiped.
This is the biggest mental shift from spreadsheets. In Excel, change a cell and every formula recalculates. In a notebook, nothing reruns unless you run it. If you edit cell 2 and skip running it, cell 5 still uses the old result.
Key takeaway: Treat a notebook like a recipe, top to bottom. Before you share one, use “Restart kernel and run all cells” to prove every step still works in order.
Spreadsheet vs notebook: when to use which
Notebooks don’t replace spreadsheets. They solve different problems.
| Task | Spreadsheet | Jupyter notebook |
|---|---|---|
| Quick edits and small lists | Best choice | Overkill |
| Sharing with non-technical colleagues | Easy | Harder, needs export |
| Files over about 1 million rows | Excel caps a sheet at 1,048,576 rows | Handles well with pandas |
| Repeating the same cleanup every month | Manual or macros | Rerun the notebook |
| Joining several files or data sources | Lookups get fragile | Built-in merge tools |
| Showing your work step by step | Hard to audit | Each step is visible |
| Charts for a quick look | Fast | Fast, more control |
| Statistics and forecasting | Limited | Full Python libraries |
If you’re still deciding between languages, our comparison of Python vs R for data analysis covers the trade-offs.
3 ways to open your first notebook
You don’t need to be a developer to start. Pick the option that fits your situation.
| Option | Setup | Cost | Best for |
|---|---|---|---|
| Google Colab | None, runs in your browser | Free tier, paid upgrades | Trying notebooks today without installing anything |
| JupyterLab or Jupyter Notebook on your computer | Install Python, then one command | Free, open source | Working with local or sensitive files |
| VS Code with the Jupyter extension | Install VS Code, Python and the extension | Free | People who also write scripts or want one editor for everything |
Google Colab
Colab is a hosted Jupyter notebook service from Google. Its FAQ says it’s free to use, stores notebooks in Google Drive and is built on Jupyter. The catch: free resources are not guaranteed, idle sessions time out and free notebooks run for at most 12 hours. Check your company’s policy before uploading business data to any cloud tool.
JupyterLab or Jupyter Notebook locally
Once Python is installed, the official Jupyter install page gives 2 one-line options:
pip install jupyterlab, thenjupyter labpip install notebook, thenjupyter notebook
Either opens a tab in your browser running on your own machine. Jupyter Notebook is the simpler interface, good for focused work and learning. JupyterLab adds tabs, side-by-side panels, a file browser and a terminal. Current versions of Jupyter Notebook (version 7 and later) are built from JupyterLab components, so the 2 feel familiar.
VS Code
Visual Studio Code supports notebooks through its Jupyter extension. You select a Python environment that has Jupyter installed, pick a kernel and run cells inside the editor.
Your first session: from spreadsheet to Python
Here’s a realistic first hour for an analyst. The goal is to repeat something you already do in Excel, so you can compare results.
Step 1: Set up the notebook
Create a new notebook and add a Markdown cell at the top with a title, the date and one sentence on what the notebook does. Future you will thank you.
Step 2: Import your tools
In the first code cell, import pandas (for tables) and matplotlib (for charts):
python
import pandas as pd
import matplotlib.pyplot as plt
If you get an error that a module isn’t found, install it with pip install pandas matplotlib in a terminal, or !pip install pandas matplotlib in a notebook cell.
Step 3: Load a file
```python sales = pd.read_csv(“sales.csv”)
or for Excel:
sales = pd.read_excel(“sales.xlsx”) ```
For .xlsx files, pandas uses the openpyxl library by default, so install it if you see an error.
Step 4: Look before you calculate
python
sales.head()
sales.info()
sales.describe()
These 3 lines show the first rows, the column types and missing values, and basic statistics. It’s the notebook version of scrolling through a sheet and eyeballing it. Our guide on how to clean data covers what to fix next.
Step 5: Recreate a pivot table
python
sales.groupby("region")["revenue"].sum().sort_values(ascending=False)
That one line does what a basic pivot table does. If you know pivot tables well, our Excel pivot tables tutorial is a helpful mental bridge.
Step 6: Make a chart
python
sales.groupby("region")["revenue"].sum().plot(kind="bar")
plt.show()
Step 7: Save and rerun
Save the notebook, then choose Restart kernel and run all. If everything runs top to bottom without errors, you now have a repeatable report. Next month, swap in the new file and run it again.
Good habits that save you later
- Name notebooks clearly, for example
2026-10-sales-by-region.ipynb. - Keep raw data untouched. Load it, then create cleaned versions in code. Never overwrite the original file.
- Use Markdown cells to explain why you did something, not just what.
- Keep cells short. One step per cell makes errors easy to find.
- Don’t hard-code secrets. Never paste passwords or API keys into a notebook you might share.
- Use version control once notebooks matter. Our Git for beginners guide is a good start.
- Clear sensitive outputs before sharing, since outputs are saved inside the file.
Where to go next
Once you’re comfortable loading, summarizing and charting data, the next skills are:
- SQL, to pull data straight from databases. Start with SQL for beginners.
- Statistics basics, so you can tell real changes from noise. See statistics basics for data analysis.
- Automation, by turning a working notebook into a scheduled report.
If you’re building toward an analyst role, our guide on how to become a data analyst maps the full skill path. For terms you’re unsure about, check the glossary.
Conclusion
A Jupyter notebook is a place to write code, see results and explain your thinking in one file. For analysts coming from spreadsheets, it’s the gentlest route into Python. Start in Colab or a local install, repeat a report you already know and rerun it from top to bottom. Once that works, you’ve built your first piece of repeatable analysis.
Sources
- Project Jupyter documentation: What is Jupyter? — notebooks, kernels, .ipynb JSON format, JupyterLab vs Notebook, name origin and IPython
- Project Jupyter: Installing Jupyter — install and launch commands
- Jupyter Notebook documentation: Migrating to Notebook 7 — Notebook 7 built on JupyterLab components
- Google Colab FAQ — hosted Jupyter service, free tier limits and storage in Google Drive
- Microsoft Support: Excel specifications and limits — 1,048,576-row worksheet limit
- pandas documentation: read_excel — openpyxl as the default engine for .xlsx files
Frequently asked questions
Is Jupyter Notebook free?
Yes. Jupyter Notebook and JupyterLab are free, open-source tools from Project Jupyter that you can install on your own computer. Hosted services built on Jupyter, such as Google Colab, also offer free tiers, though resources and session length are limited and paid plans add more. Some company platforms include notebooks as part of larger paid data tools.
What is the difference between Jupyter Notebook and JupyterLab?
Both open and run the same .ipynb files. Jupyter Notebook is the simpler, lightweight interface that shows one notebook at a time, which suits learning and focused work. JupyterLab is a fuller environment with tabs, side-by-side panels, a file browser and a terminal. Current Jupyter Notebook versions share JupyterLab's components, so switching between them is easy.
Do I need to know Python to use Jupyter notebooks?
You need only a little Python to get started. Many analysts learn Python inside notebooks, because each cell gives instant feedback. Begin with pandas basics: loading a file, filtering rows, grouping and summing. Those few commands replace much of what you do with filters and pivot tables. Notebooks also support other languages, such as R and Julia, through different kernels.
How do I open an .ipynb file?
Open an .ipynb file in JupyterLab, Jupyter Notebook, VS Code with the Jupyter extension or Google Colab. GitHub also displays notebooks in the browser, but you can't run them there. Opening the file in a plain text editor shows raw JSON, because that's how notebooks are stored. To run the code, you'll need the same Python libraries the author used.
Is Google Colab the same as Jupyter?
Google Colab is a hosted service built on Jupyter, so it uses the same notebook format and cell-based workflow. The difference is where it runs: Colab runs on Google's servers and saves notebooks to Google Drive, while a local Jupyter install runs on your computer. Colab adds free access to GPUs, but resources are limited and idle sessions time out.
Can Jupyter notebooks replace Excel?
Not entirely. Notebooks are better for large files, repeatable cleanup, joining many data sources and statistics. Excel is still faster for quick edits, small lists and sharing with colleagues who don't code. Many analysts use both: a notebook to clean and summarize data, then export a tidy table or chart to Excel or a dashboard for others.
Are Jupyter notebooks safe for company data?
They can be, if you follow your company's data rules. A local notebook keeps data on your machine, while cloud services upload it to someone else's servers. Remember that outputs, including sample rows, are saved inside the .ipynb file, so clear sensitive outputs before sharing. Never paste passwords or API keys into a notebook you plan to share.
Was this guide useful
No reviews yet. Share your experience and help other readers.