Another JupyterLab Extension You Should Know About | by Roman Orac | Towards Data Science

It’s really an exciting time to be a part of the Data Science community with all the new JupyterLab extensions that are coming out. They make Data Science much more enjoyable by minimizing the tedious work.
I remember the old days where we had to rely on numpy and matplotlib as our main tools for Exploratory Data Analysis in Python. Luckily for us, those days are long gone.
You’ll see what I mean by “long gone”, with the JupyterLab extension that is the main topic of this article.
In case you’ve missed other articles about Mito:
Mito — A Spreadsheet that Generates Python
Mito is a free JupyterLab extension that enables exploring and transforming datasets with the ease of Excel.
Mito is a missing pandas extension that we were waiting for years
When you start Mito, it shows a spreadsheet view of a pandas Dataframe. With a few clicks, you can perform any CRUD operation.
CRUD stands for Create, Read, Update, Delete
To load your data with Mito and show the spreadsheet view is as simple as:
import mitosheetimport pandas as pdurl = 'https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv'iris = pd.read_csv(url)mitosheet.sheet(iris)
Mito opens a powerful spreadsheet viewer, which enables filtering, sorting and editing the data.
And it doesn’t just stop with basic editing capabilities...
With just a few clicks, Mito can create a pivot table. It supports many common aggregations, like sum, median, mean, count, unique, etc.
What’s a pivot table? (from Wikipedia)
A pivot table is a table of grouped values that aggregates the individual items of a more extensive table within one or more discrete categories.
If pivoting tables didn’t impress you enough to give Mito a try, I’m quite confident that the following features will.
Dynamic formulas are Excel's killer feature. Excel makes it easy to create complex spreadsheets for those who’re not familiar with programming.
What if I told you that Mito supports dynamic formulas in an “Excel way”. This feature really surprised me as the team behind Mito had spent a lot of development time to implement it.
Take a look at the GIF below to see Mito’s sum formula in action:
We, Data Scientists, appreciate the tools that simplify data visualization.
At first, pandas made a huge leap from using barebones matplotlib — a powerful python package for data visualization.
Then came seaborn and plotly, which can make stunning visualizations in Python with just a few commands... a giant leap again.
... and then came Mito, which can visualize your data without writing a line of code.
Mito supports bar charts, box plots, histograms, and scatter plots.
In the GIF below, I make a bar plot with sepal width on the x-axis and species on the y-axis.
Mito transforms each operation that you make into pandas code, which you can then share with your colleagues.
The main intention of this feature is to repeat the analysis on another dataset. It’s like a pandas macro.
This is also a great feature for less experienced Data Scientists as they can learn “the pandas way” of doing Data Analysis.
I did some clicking and Mito produced the following code snippet:
Mito requires a Python 3.6 or above.
First, you need to download Mito's installer with:
python -m pip install mitoinstaller
Then to install it, simply run:
python -m mitoinstaller install
In case you have some installation errors, take a look at Mito's Common Installation Issues.
It amazes me how far has JupyterLab’s extension ecosystem came. The initial extensions were clunky, error-prone and hard to install.
The times have changed and JupyterLab’s extensions are maturing. Mito is a great example of this trend.
I’ve taken Mito to a test drive and after a couple of hours, I didn’t see the degraded performance (or some strange error).
I will add Mito to my Data Science toolbox. I plan to use it for the initial Exploratory Data Analysis — to get the feel of the data. Typing the same set of commands over and over gets tedious.
In case you’d like to learn more about Mito, it has well-written documentation (and many tutorials), which is always a good sign with such extensions.
If you enjoy reading these stories, why not become a Medium paying member? It is $5 per month, and you will get unlimited access to 10000s of stories and writers. If you sign up using my link, I will earn a small commission.