JupyterLab is a popular IDE for Jupyter notebooks, code, and data. It is an open-source web application that provides a flexible and highly customizable environment for working with data.
JupyterLab extensions are add-ons that enhance JupyterLab's core functionality. These extensions can add new features, tools, interactivity, and more to the JupyterLab interface, making it more powerful and versatile for different use cases. Extensions can be developed by the community and can be installed and managed within JupyterLab's Extension Manager to tailor the environment to specific needs. Some of these extensions have become so popular that they have been absorbed into the core ecosystem of JupyterLab. For example, the table of contents or TOC started out as an extension but is now part of JupyterLab’s core functionalities.
In this post, we’ll focus on extensions that help with productivity in the notebook when running data workflows.
1. Einblick Prompt AI (ai-einblick-prompt)
To kick this list off, we wanted to share the JupyterLab extension our own team developed, built specifically for leveraging generative AI to speed up data tasks: ai-einblick-prompt. With our extension, users can generate, modify, and fix code using natural language. A key offering of Einblick Prompt AI is its ability to utilize contextual information to tailor its responses. For example, with the Prompt extension, users don’t need to type in information specifying table names, column names, or even data types, a lot of that information, stored in metadata can be inferred by Prompt, saving you time spent writing out long, detailed queries. You can read more about what and how the engineering team designed a system for domain-specific code generation on our blog.
2. Jupyter AI
Project Jupyter’s most well-known generative AI extension at the time of writing, Jupyter AI allows the user to query large language models like ChatGPT or Claude wherever the Jupyter kernel runs. However, the Jupyter AI extension for JupyterLab has an added function called Jupyternaut, which serves as a chatbot within JupyterLab, where you can ask questions about your files and data. You can read our in-depth blog post on Jupyter AI here.
The jupyterlab-git extension allows you to use version control via Git, within JupyterLab’s UI. You can see the differences between file versions, check out different branches and tags. One of the chief complaints of Jupyter files in the past has been an inability to collaborate with others, and implement version control. The Git extension is a great way to add this functionality to any user’s experience.
The GitHub extension, on the other hand, allows users to easily browse, read, and run JupyterLab-compatible files within JupyterLab. In the left hand panel, simply search a username or organization name, and you’ll see their public repositories populate. Then you can open and run files. Note that you cannot create pull requests, make commits, etc. But this does make it a lot easier to access work you may be interested in, without needing to download the files on your end. This can also be helpful in sharing work with your colleagues or collaborators.
The nbdime extension, which stands for notebook diff and merge, provides a content-aware, visual way to see and compare the differences between notebook files. Ipynb files are complex and the extension provides a UI similar to the diffs and merges one sees in GitHub. This extension provides an intuitive solution and interface to the problems discussed above when working with Jupyter notebook files.
Now a part of the core extensions available in JupyterLab, the Debugger is a visual interface within JupyterLab that allows you to set breakpoints, monitor variables, and work through your code more easily and efficiently. As long as you’re using a kernel where debugging is enabled, all you have to do is click the small bug icon in the upper left corner, and you’ll open up a new side panel, pictured above.
7. Jupyter Resource Usage
The Resource Usage extension provides a new right hand panel including information about CPU and memory usage. It also adds some information in the toolbar at the bottom of JupyterLab for quick reference.
8. Execute Time
Built by the D. E. Shaw group, the aptly named jupyterlab-execute-time extension displays execution time after each cell once its run. Below every cell a small gray rectangle displays the time of execution as well as the time it took to complete.
9. JupyterLab SQL Editor
The JupyterLab SQL editor extension, run by the Canadian Centre for Cyber Security allows you to use SQL query engines like Spark and Trino within JupyterLab to make coding in SQL a lot easier. Features like autocompletion, syntax highlighting, and code formatting make coding in SQL within JupyterLab a much more pleasant experience. You can see more examples in their GitHub repo.
10. Variable Inspector
The Variable Inspector extension is well-maintained and has a simple UI for checking out different variables and their properties. You can install the extension directly through the Extension Manager, and then right-click anywhere in JupyterLab to select the option “Open Variable Inspector.” NOTE: you may need to relaunch JupyterLab after installation. However, if you’re coming from a background in R using RStudio, or another similar IDE, the Variable Inspector is a great and familiar addition to JupyterLab.
11. Matplotlib (ipympl)
Run by a fundamental open-source community, the matplotlib extension or ipympl allows you to create interactive widgets of matplotlib charts and graphs within JupyterLab. This way, you can experience matplotlib in a whole new way, enabling panning and zooming, all within the JupyterLab interface.
Another popular plotting library, plotly, also has created a JupyterLab support that allows for greater interactivity within JupyterLab. You can autoscale, pan, highlight certain sections, and more. Given that a huge draw of plotly graphs are their interactivity, it’s great to be able to maximize it while in JupyterLab.
13. JupyterLab LSP (Language Service Protocol)
The Language Service Protocol extension for JupyterLab provides useful information like completion suggestions, function signatures, and the ability to jump to references of variables. This speeds up navigation throughout the files, and facilitates programming.
14. JupyterLab Code Formatter
The JupyterLab Code Formatter, once installed, is available as a button in the toolbar. It will provide pop-ups regarding any cells it has trouble parsing and will standardize things like spacing and line breaks.
JupyterLab can be a powerful and customizable platform to work with data, particularly when augmented by community-driven extensions. If you're interested in learning more tips and tricks to drive productivity in your data science projects, check out more on our blog.
Einblick is an AI-native data science platform that provides data teams with an agile workflow to swiftly explore data, build predictive models, and deploy data apps. Founded in 2020, Einblick was developed based on six years of research at MIT and Brown University. Einblick is funded by Amplify Partners, Flybridge, Samsung Next, Dell Technologies Capital, and Intel Capital. For more information, please visit www.einblick.ai and follow us on LinkedIn and Twitter.