Introducing Jupyter NotebookWhat is Jupyter Notebook?
Jupyter Notebook (sometimes called IPython Notebook) is a popular way to write and run Python code, especially for data analysis, data science and machine learning. Jupyter Notebooks are easy-to-use because they let you execute code and review the output quickly. This iterative process is central to data analytics and makes it easy to test hypotheses and record the results (just like a notebook).
For example, let’s say you are visualizing a dataset about life expectancy by country. You only want to show some countries, but you are not sure which ones to select. With a Jupyter Notebook, you can try multiple versions and easily compare. Even better, you have a written record of what you’ve already tried that you can show a teammate (or your future self). This is just one example of the many benefits of working within a notebook-like environment.
Getting Familiar with Jupyter Notebook
Above is the Jupyter Notebook interface. A Jupyter Notebook has two parts:
- the front-end interface (what you see in the gif)
- the back-end kernel
The front-end interface loads in a web browser and consists of “cells” where you enter your code. The browser is just for display, so you do not need to be connected to the internet.
Jupyter Notebook uses a back-end kernel called IPython. The ‘I’ stands for ‘Interactive’, which means that a program or script can be broken up into smaller pieces, and those pieces can be run independently from the rest of the program.
You do not need to worry about the difference between Python and IPython. The important thing to know is that you can run small pieces of code, which can be helpful when working with data.
Integrated Development Environments (IDEs)
Jupyter Notebook is a type of Integrated Development Environment (IDE). IDEs are places to write code that offer some supportive features. Almost all IDEs provide syntax highlighting, debugging, and code completion. Jupyter Notebook also offers embedded help documentation and introspection (i.e., you can check each command’s parameters) and in-line display of charts and images.
There are many IDEs for writing Python. We recommend Jupyter Notebook because running small experiments is also very helpful when learning how to code.
However, the best way to get familiar with Jupyter Notebook is to work with it yourself. So without further ado, let’s walk through getting Jupyter Notebook and related tools installed on your computer in the next article!