7 Useful Extensions You Should Have on Jupyter Notebook
By: Amin Nazerzadeh
Tags: Python, Nbextensions, Data Science, Extension, Jupyter Notebook

Extend the notebook experience by using one of the most popular extension package Nbextensions which is a bundle of useful plugins. I will show you how to get the extensions, how to install them, and how to enable and disable them using an extension manager. First of all, we have to install Nbextensions with Anaconda from the command line:

conda install -c conda-forge jupyter_contrib_nbextensions

conda install -c conda-forge jupyter_nbextensions_configurator

jupyter contrib nbextension install --user

Install Nbextensions with pip from the command line:

pip install jupyter_contrib_nbextensions

pip install jupyter_nbextensions_configurator

jupyter contrib nbextension install --user

jupyter nbextensions_configurator enable --user

Once they’re installed, we will see a Nbextensions tab. You can go to the home page of your Jupyter Notebook, and you will find a new Nbextensions tab.

As you can see, they are many extensions that you can choose from. To get more information about each extension you can highlight them and read the description. If you’d like the extension you can just simply check the box and use it in your notebook. As you can see there are many of them, so I chose 7 of them that I found it useful for my work. Let’s dive in

1. Hinterland

Open the Nbextensions and search and enable Hinterland. This extension helps in autocompleting the code. Without this, you would require to press tab and check for the available options for code completion. However, Hinterland enables the autosuggestion as you type. You can also configure the behavior of the extension such as hint delay, hint inside comments, and more. The parameters can be changed from the Nbextensions menu.

2. Notify

The Notify extension displays a web notification in the top right hand corner of your screen when the kernel becomes idle, meaning the code has finished running.

The “Notify” drop-down menu in the Jupyter Notebook toolbar allows you to disable the feature or select notifications for code that takes longer than 0, 5, 10, or 30 seconds to run.

3. Snippets Menu & Snippets

And this is where extensions really start doing the work for you. The Snippets Menu extension adds a menu item to your Jupyter Notebook where you can search for snippets, boilerplate, and examples of code to insert into your notebook.

Snippets extension is also another add on. Since they are similar in terms of what they are trying to do I counted them together. Snippets adds a drop-down menu to insert snippet cells into the current notebook. Instead of copy pasting lines of libraries or codes, you can simply customize your own on the drop-down menu and paste your own codes or libraries. Imagine how much time you can save.

4. Spellchecker

This Nbextension provides a CodeMirror overlay mode to highlight incorrectly spelled words in Markdown and Raw cells

The extension provides (Hunspell) SCOWL dictionaries for American, British, Canadian, and Australian English.

5. Table of Contents 2

What Table of Contents do is auto-generates a table of contents. It collects all running headers and display them in a floating window, as a sidebar or with a navigation menu.

The table of contents is automatically updated when modifications occur in the notebook. This is basically essential when you’re working with a notebook of any real length. I don’t know why it isn’t just a standard feature in Jupyter.

6. ExecuteTime

ExecuteTime extension displays the time when each cell has been executed and how long it took. This is very useful if you are running large data and you want to know how long it took you to run it, or also can be a helpful reminder of what has and has not been executed.

7. Live Markdown Preview

Some of us like writing our blogs using Markdown in a Jupyter Notebook. Sometimes it can be hectic as you make errors in writing. Now you can see Live-preview of the rendered output of markdown cells while editing their source.