Why you should consider switching to JupyterLab from Jupyter Notebook

Jacob Ash
4 min readMar 24, 2021

--

Project Jupyter logo

When starting my Data Science journey, I was required to download a software called Jupyter Notebook. Jupyter Notebook is “a web-based interactive computational environment for creating Jupyter notebook documents”¹. Basically, Jupyter Notebook allows you to run code straight from your browser. While this is incredibly useful, I was missing my IDE experience from software like VS Code or PyCharm. Luckily, the makers of Jupyter Notebook has that covered! Introducing JupyterLab, Project Jupyter’s “Next Generation Notebook Interface”!¹ This new iteration of their User Interface gave me everything I missed from my IDE’s. If you use Jupyter Notebook, but are looking for more, here are some reasons why you should check JupyterLab out!

1. JupyterLab can run notebooks

While this may be a bit self-explanatory, JupyterLab can still run any of your classic Notebooks. Since JupyerLab uses the same server and file format as Jupyter Notebook, you do not have to worry about compatibility issues. Sweet!

2. Only One Tab

Instead of having one tab per notebook, JupyterLab allows users to have all of their active notebooks on one page. This saves you from the headache of finding the right tab out of the 20,000 Jupyter tabs that are currently open.

3. Dividing workspace

Being able to divide your workspace into multiple panels is one of my favorite features of JupyterLab. Being able to see multiple files at one time (like a CSV, markdown, and a notebook) has increased my productivity tenfold. Instead of having to bounce between files to find what I am looking for, I just need to look at the file that is displayed right next to my current file.

Project Jupyter’s example of a Lab in use. Source

4. Built-in Features/Themes:

If staring at your white screen for hours gives you a headache, I’ve got some good news for you! JupyterLab offers a built-in dark theme, which allows the user to work in a less straining environment. If this theme doesn't cut it for you, there's still a couple of options. First, you can download a different theme straight from JupyterLab by using the extensions, or you can install Jupyter Themes. Jupyter Themes is an extension to the Jupyter environment that comes with 9 prebuilt themes, and more customizable options. If you would like to learn more about Jupyter Themes, please check out the blog my classmate wrote covering this topic!

Example of the built-in dark theme

5. File Formatting (CSV and Markdown)

Do you wish viewing a CSV looked more like an excel spreadsheet, rather than a bunch of numbers on your screen? Well, you're in luck! JupyterLab displays CSV’s in an excel spreadsheet manner so it is easier to comprehend.

Below is a CSV of housing data from King County Washington, viewed in Jupyter Notebook.

Jupyter Notebook CSV format

What is going on here? Taking a quick glance at this data, it is almost impossible to figure out what is happening. Now, let's look at this same CSV, but in JupyterLab!

JupyterLab CSV format

Now I can get a feel for what's going on in here! it divided the CSV by the delimiter, so now I can actually obtain information when taking a peek at the file. Nice!

JupyterLab also displays a live rendering of your markdown file! Now, you can finally see what your .md file will look like while in the editing process.

Markdown viewed with editor and live viewer

6. Custom Keyboard Shortcuts:

In the classic Notebooks, you can traverse the UI through built-in keyboard shortcuts. Well, not only are those shortcuts still around in Lab, but you can also make your own custom shortcuts, or edit the originals!

7. Extensions:

Last but not least, the extensions. Essentially an app store for JupyterLab, extensions allow you to download, well, extensions to your environment. These are 3rd party additions that allow you to update your Lab to your heart's content. From new themes, file viewers, keyboard shortcuts, to just general settings, if you think of something, it's probably there available to download.

How to download

If JupyterLab sounds like something you’d like to try, here's a couple of ways to install it!

Conda:

conda install -c conda-forge jupyterlab

Pip:

pip install jupyterlab

Conclusion

While these are only some reasons why I recommend JupyterLab, I can promise you that there's more to it than meets the eye. There might be a slight learning curve, but after switching to JupyterLab, I can’t see myself going back. I hope this post has helped your decision to give JupyterLab a try!

--

--

Responses (1)