Mito combines your favorite data science tools in a neat Python package
Mito is a spreadsheet interface for Python. You can import Mito into your Jupyter Notebook and a spreadsheet will appear.
Just as the saying goes, one video is worth thousands of words — I know… it doesn’t go like that 🙂
Each edit you make in the spreadsheet will generate the equivalent Python in the code cell below. As an example, if you make a pivot table in Mito, the Pandas pivot code will automatically appear, with documentation, in the following code cell.
Auto-generated code is great for repeating your analysis on another machine and for Data Science newbies to get up and running with pandas way of working with data.
Mito is most commonly used in one of two ways:
- The first is for Python users to write code quickly. Since Mito automatically generates code and auto-documents it, you no longer have to go to Google or Stack Overflow to find the right syntax for a lot of operations.
- The second use case is transitioning from spreadsheet workflows to Python, which I cover in this article.
I assume you have a recent Jupyter Lab version installed on your machine. If that’s not the case, see official Jupyter Lab documentation to get started.
To install Mito, run these commands:
python -m pip install mitoinstaller
python -m mitoinstaller install
Then open Jupyter Lab and import the Mitosheet:
You can see the full installation instructions in the “docs” page of the Mito website.
In Mito, you can import Excel files or CSVs. All you need to do is click the import button and you can browse your local files.
Handling a large dataset in a spreadsheet can be incredibly slow — updating formulas, creating pivot tables, or generating charts can take minutes or even hours to load. And if you have a dataset larger than 1 million rows, Excel won’t even accept it.
Many Mito users take their spreadsheets and import them into Mito to process the data quickly. Mito can handle any data size that fits into a Pandas DataFrame (that’s millions and millions of rows), and when you import your dataset, Mito automatically turns it into a DataFrame.
With Mito, you can perform spreadsheet and Data Science operations such as:
- Spreadsheet Formulas
- Editing specific cells in the DataFrame
- See summary stats
- Adding and Deleting Columns
- and more!
In the visualizations below, you can see what it is like to filter a dataset, make a pivot table, and make a graph, and have the equivalent code generated in the code cell below.
Excel-like Spreadsheet Formulas
After you complete your analysis in Mito, there are a few ways you can share your result. Some users want to take the generated code and either copy it to another script or apply something more advanced like an ML model later in the notebook.
Many users want to bring the output back to a spreadsheet. Within Mito, you can click “Export button” and get the current state of Mito back as an Excel file or CSV.
Here is the Mito website, where you can learn more about the tool and get the install instructions.
Mito is a powerful tool for those wishing to transition from spreadsheet environments like Excel or Google Spreadsheets to Python.
I use Mito for the initial Exploratory Data Analysis — to get the feel of the data. Typing the same set of commands over and over gets tedious.
Will you add Mito to your Data Science toolbox? Let me know in the comments below.