Advertisement

Active Hackathon

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: 

THE BELAMY

Sign up for your weekly dose of what's up in emerging technology.
  • 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

Our Upcoming Events

Conference, Virtual
Genpact Analytics Career Day
3rd Sep

Conference, in-person (Bangalore)
Cypher 2022
21-23rd Sep

Conference, in-person (Bangalore)
Machine Learning Developers Summit (MLDS) 2023
19-20th Jan, 2023

Conference, in-person (Bangalore)
Data Engineering Summit (DES) 2023
21st Apr, 2023

Conference, in-person (Bangalore)
MachineCon 2023
23rd Jun, 2023

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
MOST POPULAR

Council Post: How to Evolve with Changing Workforce

The demand for digital roles is growing rapidly, and scouting for talent is becoming more and more difficult. If organisations do not change their ways to adapt and alter their strategy, it could have a significant business impact.

All Tech Giants: On your Mark, Get Set – Slow!

In September 2021, the FTC published a report on M&As of five top companies in the US that have escaped the antitrust laws. These were Alphabet/Google, Amazon, Apple, Facebook, and Microsoft.

The Digital Transformation Journey of Vedanta

In the current digital ecosystem, the evolving technologies can be seen both as an opportunity to gain new insights as well as a disruption by others, says Vineet Jaiswal, chief digital and technology officer at Vedanta Resources Limited

BlenderBot — Public, Yet Not Too Public

As a footnote, Meta cites access will be granted to academic researchers and people affiliated to government organisations, civil society groups, academia and global industry research labs.