Skip to content

Extensions & Tools

Install via pip (modern approach):

Terminal window
# Table of Contents
pip install jupyterlab-toc
# Git integration
pip install jupyterlab-git
# Variable inspector
pip install lckr-jupyterlab-variableinspector
# Code formatter (Black/isort)
pip install jupyterlab-code-formatter black isort
# Spellchecker
pip install jupyterlab-spellchecker
# Execute Time — shows how long each cell took
pip install jupyterlab-execute-time
# Drawio diagrams
pip install jupyterlab-drawio
# System monitor (CPU/RAM in status bar)
pip install jupyter-resource-usage

Classic Notebook Extensions (nbextensions)

Section titled “Classic Notebook Extensions (nbextensions)”
Terminal window
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
# Enable specific extensions
jupyter nbextension enable toc2/main
jupyter nbextension enable collapsible_headings/main
jupyter nbextension enable execute_time/ExecuteTime
jupyter nbextension enable varInspector/main

Popular nbextensions:

  • Table of Contents (toc2) — sidebar TOC from headings
  • Collapsible Headings — fold sections
  • ExecuteTime — show execution time per cell
  • Variable Inspector — live variable browser
  • Autopep8 — auto-format code cells
  • Scratchpad — scratch cell that doesn’t affect notebook

Multi-user Jupyter server for teams:

Terminal window
pip install jupyterhub
jupyterhub --generate-config
jupyterhub

Use cases:

  • Team data science environments
  • University courses
  • Cloud deployments (AWS, GCP, Azure)

Convert notebooks to interactive web apps without showing code:

Terminal window
pip install voila
voila my_notebook.ipynb
voila my_notebook.ipynb --port 8866
Terminal window
# Batch execute all notebooks in a directory
for nb in notebooks/*.ipynb; do
jupyter nbconvert --to notebook --execute "$nb" --output "executed/$nb"
done
# Schedule with cron
0 6 * * * jupyter nbconvert --to notebook --execute /path/to/report.ipynb
# Rich tables and progress
from rich import print
from rich.table import Table
# Better DataFrames
import pandas as pd
pd.set_option('display.max_columns', None)
pd.set_option('display.float_format', '{:.2f}'.format)
# Profiling reports
import ydata_profiling # formerly pandas-profiling
profile = ydata_profiling.ProfileReport(df)
profile.to_notebook_iframe()
# Interactive data exploration
import dtale
dtale.show(df)
# Sweetviz — EDA reports
import sweetviz as sv
report = sv.analyze(df)
report.show_notebook()
Terminal window
# Connect to a remote kernel
jupyter notebook --no-browser --port=8888 --ip=0.0.0.0
# SSH tunnel from local machine
ssh -N -L 8888:localhost:8888 user@remote-server
# Then open http://localhost:8888 locally

VS Code has native Jupyter support:

  • Open .ipynb files directly
  • Run cells with Shift+Enter
  • Variable explorer built-in
  • Debugger support
  • GitHub Copilot integration in cells

nbformat — Programmatic Notebook Creation

Section titled “nbformat — Programmatic Notebook Creation”
import nbformat
from nbformat.v4 import new_notebook, new_code_cell, new_markdown_cell
nb = new_notebook()
nb.cells = [
new_markdown_cell("# My Generated Notebook"),
new_code_cell("import pandas as pd\ndf = pd.DataFrame({'a': [1,2,3]})"),
new_code_cell("df.head()"),
]
with open('generated.ipynb', 'w') as f:
nbformat.write(nb, f)