Enhance the usability of Jupyter Notebook

Shekhar Khandelwal
4 min readMar 27, 2021

--

3 major enhancements discussed in this article -

  1. Notebook extensions
  2. Integrate webpages, pdf’s and video in the notebook
  3. Notebook themes

Notebook Extensions

Install notebook extensions -

Step 1 — Run pip install notebook extensions

!pip install jupyter_contrib_nbextensions && jupyter contrib nbextension install

Before (Look at the available tabs) —

After (additional tab available ) —

Step 2 — Go to ‘Nbextensions’ tab

Note — ‘Nbextensions’ can also be found in ‘Edit’ options.

Whole list of extensions available to install and optimize the notebook environment.

  1. Datestamper
  2. Exercise
  3. Exercise 2
  4. Gist-it
  5. Hide input all
  6. Initialization Cells
  7. nbTranslate
  8. Runtools
  9. spellchecker
  10. Code prettify
  11. Collapsible headings
  12. Scratchpad
  13. Split Cells Notebook
  14. Tree filter
  15. Codefolding
  16. Highlighter
  17. Snippets
snippets demo gif sourced from jupyter notebook documentation
  1. Snippets menu
  2. Table of Contents
  3. Variable Inspector
  4. Autopep8
  5. Hinterland
  6. Load Tex macros
  7. Printview

Extension 1 — Hinterland

Enable code autocompletion menu for every keypress in a code cell, instead of only calling it with tab.

Extension 2 — Snippets menu

This plugin allows you to insert common usable snippets into the code directly.

Select the option from the available plot snippets, for example Histogram.

This will automatically insert the code snippet to create a basic histogram plot.

Extension 3 — Snippets

You can add your reusable code snippets and it will be available in the drop down here-

Extension 4 — Split Cells notebook

Extension 5 — Table of Contents

Extension 5 — Collapsible Headings

Integrate webpages, pdf’s and video in the notebook

Notebook themes

Step 1 — Install jupyterthemes.

Step 2 — List all the available themes

Step 3 — Select a theme and apply

Step 4 — Restart Jupyter Notebook and enjoy the new theme.

Use ‘jt -r’ to return to original theme.

References :-

https://towardsdatascience.com/bringing-the-best-out-of-jupyter-notebooks-for-data-science-f0871519ca29

--

--

Shekhar Khandelwal
Shekhar Khandelwal

Written by Shekhar Khandelwal

Data Scientist with a majors in Computer Vision. Love to blog and share the knowledge with the data community.

No responses yet