Variable Inspector for JupyterLab
Many JupyterLab users find it frustrating to constantly print variables just to check their values. It takes time and clutters the notebook. But what if there was a better way? Variable Inspector is a simple and powerful extension that lets you see all your variables in one place, displaying their names, values, types, shapes, and sizes in real-time. Sounds useful? Let’s dive in and see how it works!
Installation
Variable Inspector is a free and open-source extension for JupyterLab, so you can use it without any cost. Installation is easy - just run the following pip
command:
pip install variable-inspector
Or, you can download it directly from GitHub: https://github.com/mljar/variable-inspector.
This extension is also available in MLJAR Studio, a tool that helps you code faster with useful features like an AI assistant. It includes many other powerful tools for Data Science.
If you want to learn more, visit: https://mljar.com/
After installing Variable Inspector, a new icon will appear on the JupyterLab sidebar:

To use the extension, just click the icon – it’s that simple! 😊
Features
Display variables
Variable Inspector views all the variables in your current notebook as a clear, organized list that updates in real-time, making it easy to track them:

Display DataFrames
You can view the DataFrame values in an interactive table that lets you explore and interact with the data easily:

It's important to mention that DataFrame values are also updated automatically after any modification in the Python code:

Customize displayed columns
Variable Inspector allows you to choose which columns to display. By default, it shows names and values, but you can also include types, shapes, and sizes if needed:

Automatic or manual refresh
The variable list updates automatically whenever you run a cell. However, you can choose Manually Refresh to update it whenever you want and reduce unnecessary calculations:

Dark theme
If you prefer a dark mode in JupyterLab, this extension also offers a Dark Theme:

Conclusion
Variable Inspector makes managing variables in JupyterLab much easier. It lets you track values in real-time, preview DataFrames, and customize what you see—all without cluttering your notebook. Features like auto or manual refresh, and a dark theme make using it even more comfortable and enjoyable! Try it today and improve your JupyterLab workflow!