What’s So Great About Jupyter Notebook?

I made the jump to Jupyter Notebook. Here’s why you should too.

Written by Manuel Silverio
What’s So Great About Jupyter Notebook?
Image: Shutterstock / Built In
Brand Studio Logo
UPDATED BY
Brennan Whitfield | Sep 19, 2023

Every day the number of Python notebooks grows. Developers around the world have fully embraced Jupyter Notebook and now it’s become a must-have in the industry.

I first noticed this trend in 2019, but back then I didn’t feel inspired to change, but in 2020 more and more developers embraced Jupyter Notebooks. I saw Python developers praising Jupyter Notebook on YouTube and taking it for granted that everyone else was a convert too.

Jupyter Notebook Advantages

  • Convenient for the initial development of code
  • Helps segment your code (and re-run segments)
  • Stores values of variables from segments you’ve already run

Ultimately, I made the leap to understand how Jupyter Notebook works. How great could it be? Now I’m one of those converted developers. It feels like I’ve always used Jupyter Notebook; like it’s always been there. It’s really come to feel like the simplest tool in the world. It won’t replace your regular Python environment but it will drastically enhance it.

More From Manuel SilverioWhat Is a Smart Device?

 

What Is Jupyter Notebook?

Jupyter Notebook is a web-based application used to create and share interactive notebook documents, which can contain live code, text, data visualizations, videos and other computational outputs. Created by Project Jupyter, the application is open-source and supports the use of over 40 programming languages, including Python, R and Scala

Jupyter Notebook showcases real-time code results and imagery, and can execute cells in any order. This makes it a useful tool for quick code experimentation, designing code presentations or facilitating data science workflows.

Find out who's hiring.
See all Developer + Engineer jobs at top tech companies & startups
View 10000+ Jobs

 

Why Use Jupyter Notebook?

1. Initial Code Development and Segmentation

Jupyter Notebook is convenient for the initial development of code. It allows you to segment your code (and re-run segments of your code) while storing the values of variables from segments you’ve already run. Here’s an example:

jupyter notebook

Here is the same notebook on GitHub.

As you can see in this example, each cell runs separately. This is great when a certain part of your code contains never-ending arrays or a machine learning training operation. With Jupyter you can run these long operations once, create a new cell below, and use the values you obtain from previous cells.

 

2. Creating Documentation and Tutorials

Another situation where developers often use Jupyter is to create documentation or tutorials for their team. You can explain your thought process much better in a notebook rather than using internal comments within your code.

 

How to Install and Use Jupyter Notebook

Jupyter Notebook can be installed using the Anaconda distribution or Miniconda (recommended for new Python users), or by using pip, Python’s default package manager (recommended for experienced Python users). 

For this tutorial, we’ll use the pip installation method and focus on installation for Windows and macOS systems.

 

1. Download and Install Python

Download the latest version of Python for Windows or macOS from the Python official website, and install the program accordingly. 

For Windows: In the Python Setup window, check the “Add Python to PATH” box before clicking install.

 

2. Open Terminal and Install Jupyter Notebook

Open Terminal on your computer and type the following text in the window:

For Windows: pip install notebook

For macOS: pip3 install notebook

Press enter to start the installation. You should see multiple lines of text running in the Terminal window, which means Jupyter Notebook is installing. The text will stop running once installation is complete.

 

3. Launch Jupyter Notebook Using Terminal

After installing Jupyter Notebook, type the following text in the Terminal window:

jupyter notebook

Press enter and this will automatically launch the Jupyter Notebook application in your default web browser.

 

4. Create New Notebook

In the opened Jupyter Notebook webpage, click the “New” button and select “Python 3” from the dropdown menu. This will open another webpage for a new notebook document. 

As an extra visual, I took the liberty of creating a tutorial explaining how to install and use Jupyter Notebook ... in a Jupyter Notebook document.

jupyter notebook

You can access the notebook above from GitHub.

More on PythonHow to Install Python on Windows 10

 

A Caveat: Jupyter Notebook Isn’t Always Your Best Tool

Despite how useful Jupyter is, it still doesn’t replace an integrated development environment (IDE) like PyCharm or Visual Studio Code. If you need to create long, self-contained classes or just pack your code for submission you might prefer moving your code from Jupyter to an IDE. Jupyter is great for development, but once you’ve done the developing, it isn’t the best place for constant implementation.

Another important difference to consider is code completion. By default, Jupyter Notebook offers weak code completion features when compared to an IDE like PyCharm, so you better know your code well.

Jupyter also offers JupyterLab alongside Jupyter Notebook. I have to warn you off using JupyterLab instead of Jupyter Notebook, though. I’ve tried both and I’ve found JupyterLab lacks certain key functionalities you find in Jupyter Notebook.

More on Python5 Ways to Write More Pythonic Code

 

Don’t Take My Word on Jupyter Notebook

Many developers and researchers are involved with projects that require Python on a daily basis. Regardless of your coding skills, Jupyter Notebook adds value to a backend or (especially) analytics team. Jupyter provides a framework and interface that encourages good knowledge management practices by allowing for clear documentation and chronological explanation of the implemented code.

In the end, if you use Python regularly but don’t use Jupyter Notebook (yet), then you might want to reconsider your life choices. I did.

 

Frequently Asked Questions

Jupyter Notebook is used to create interactive notebook documents that can contain live code, equations, visualizations, media and other computational outputs.

Jupyter Notebook is often used by programmers, data scientists and students to document and demonstrate coding workflows or simply experiment with code.

Python is a programming language used across various software engineering and software development areas. 

Jupyter Notebook is a web application and computing environment that can be used for programming tasks. Jupyter Notebook's default kernel (ipykernel) is Python-based, which allows Python code to be executed within notebook documents by default.

Hiring Now
OTR Solutions
Cloud • Fintech • Logistics • Transportation • Financial Services
SHARE