8 Jupyter Notebook Extensions That Everyone Should Know About

Jupyter notebook extensions

A product of IPython, Jupyter Notebook has been widely popular among data scientists and is a default environment for research. Jupyter Notebook is an “Open-source web application that allows you to create and share documents that contain live code, equations, visualisations and narrative text.”

Established in February 2015, Jupyter Notebook’s purpose is to support interactive data science and scientific computing across programming languages, making it the go-to choice for data scientists. The main uses of Jupyter Notebook are: 

  • Data cleaning 
  • Data transformation 
  • Numerical simulation 
  • Statistical modeling 
  • Data visualisation 
  • Machine learning

According to popular code-sharing site GitHub, more than 2.5 million public Jupyter Notebooks were available as of September 2018. This was up from two lakh or so public Jupyter Notebooks in 2015. 

Jupyter Notebook comes with extensions or add-ons that broaden the functionality of the application. While there are 99 ways in which a developer can extend the Jupyter ecosystem, we have earlier listed eight extensions, and today we list an additional 10 extensions: 

Jupyter Dash 

This library makes it easy to build Dash apps from Jupyter environments– classic Notebook, JupyterLab, Visual Studio Code notebooks, PyCharm notebooks. It features non-blocking execution; display modes such as external, inline and JupyterLab; Hot reloading (ability to automatically update a web application when changes are made to the application’s code); error reporting; Jupyter Proxy Detection; and Dash enterprise workspaces.

For more information, click here

JupyterLab nbgather

This extension saves the history of all the code one has executed and their outputs. It uses tools for the following purposes: 

  • For cleaning code 
  • Recovering lost code 
  • Comparing versions 

For more information, click here

Spellchecker 

The Spellchecker extension, as the name suggests, highlights words that are misspelled in markdown cells within notebooks and in the text files. It is especially useful for when one wants to share their notebook, pushing it to GitHub or during presentations. 

The spellchecker extension relies on Typo.js and is available from the context menu. It provides SCOWL (Spell Checker Oriented Word Lists) for American, British, Canadian and Australian English; French; German; Portuguese and Spanish. 

The extension has been tested up to JupyterLab Version 3.0. 

For installation, use: 

  • pip install jupyterlab-spellchecker or conda install -c conda-forge jupyterlab-spellchecker (for JupyterLab 3.x)
  • jupyter labextension install @ijmbarr/jupyterlab_spellchecker (for JupyterLab 2.x)

For more information, click here

Autopep8

This extension reformats or prettifies code in a notebook’s code cell. The PEP8 formatter for Jupyter notebook uses the autopep8 Python module to reformat Python code to conform to the PEP8 style guide. 

Once the pip install autopep8 [–user] package is installed, the Autopep8 extension provides a toolbar button and a keyboard  shortcut for reformatting the code-cell. The extension also points out basic syntax errors. 

The extension can be installed using the following code: 

jupyter nbextension install https://github.com/kenkoooo/jupyter-autopep8/archive/master.zip –user

jupyter nbextension enable jupyter-autopep8-master/jupyter-autopep8

For more information, click here

Toggle all line numbers 

This extension allows one to turn off and on line numbers in code cells. It is available as a button in the panel menu. 

For more information, click here

Variable Inspector 

This Jupyterlab extension features the variables currently in use and displays their values. The Variable Inspector extension allows inspection of variables for both consoles and notebooks; metrics in a datagrid-viewer; and allows the inline and interactive inspection of Jupyter Widgets. 

Although meant for Python, the extension also supports R and Scala. It requires JupyterLab 3.0 or higher versions. Additionally, its requirements include: 

  • For Python functionality: Pandas and numpy to enable matrix inspection; pyspark for spark support; tensorflow and keras to allow inspection of tf objects; torch for PyTorch support 
  • For R functionality: repr library 

Use the following code to install this extension: 

pip install lckr-jupyterlab-variableinspector

For more information, click here

JupyterLab LSP 

LSP or Language Server Protocol promotes inter-process communication enabling multiple languages support. LSP integration offers the following features: 

  • Diagnostics of critical errors and warnings 
  • Automatic completion for certain characters when triggered 
  • Renaming variables and functions
  • Advanced static-analysis autocompletion 
  • Diagnostic panel

For more information, click here

Hide code input

As the name suggests, this is a Jupyter Notebook extension to selectively hide code, prompts and outputs. 

The prerequisites include Jupyter Notebook 6.1 or older, Jupyter nbconvert 5.x or higher, pdfkit and wkhtmltopdf, and Python 3.7 or higher. 

Use the following code to install the extension on Jupyter Notebook: 

  • pip install hide_code
  • jupyter nbextension install –py hide_code
  • jupyter nbextension enable –py hide_code
  • jupyter serverextension enable –py hide_code

For more information, click here

More Great AIM Stories

Debolina Biswas
After diving deep into the Indian startup ecosystem, Debolina is now a Technology Journalist. When not writing, she is found reading or playing with paint brushes and palette knives. She can be reached at debolina.biswas@analyticsindiamag.com

More Stories

OUR UPCOMING EVENTS

8th April | In-person Conference | Hotel Radisson Blue, Bangalore

Organized by Analytics India Magazine

View Event >>

30th Apr | Virtual conference

Organized by Analytics India Magazine

View Event >>

MORE FROM AIM
Yugesh Verma
All you need to know about Graph Embeddings

Embeddings can be the subgroups of a group, similarly, in graph theory embedding of a graph can be considered as a representation of a graph on a surface, where points of that surface are made up of vertices and arcs are made up of edges

Yugesh Verma
A beginner’s guide to Spatio-Temporal graph neural networks

Spatio-temporal graphs are made of static structures and time-varying features, and such information in a graph requires a neural network that can deal with time-varying features of the graph. Neural networks which are developed to deal with time-varying features of the graph can be considered as Spatio-temporal graph neural networks. 

Vijaysinh Lendave
How to Evaluate Recommender Systems with RGRecSys?

A recommender system, sometimes known as a recommendation engine, is a type of information filtering system that attempts to forecast a user’s “rating” or “preference” for an item. In this post, we will look at RGRecSys, a library that performs constraint evaluation of recommender systems.

Meeta Ramnani
GitHub releases Git 2.35

The ‘git log’ now has a rich set of ‘—format’ options to customise the output of ‘git log’.

3 Ways to Join our Community

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Telegram Channel

Discover special offers, top stories, upcoming events, and more.

Subscribe to our newsletter

Get the latest updates from AIM