Mito
Mito is a spreadsheet library in Python. If you can edit Excel files, you can write code. That's because for every action we perform in a table, Mito will automatically generate the corresponding Python code. Say goodbye to repetitive and boring operations.
Installing Mito
Make sure that Python is at version 3.6 and above before installing.
pip install mitoinstaller
Then execute:
python -m mitoinstaller install
Wait for the command execution to complete.
The mitoinstaller installer installs Mito for both classic Jupyter Notebook and JupyterLab. it will start JupyterLab automatically, and you can also start Jupyter Notebook manually to use Mitosheet.
Mito reads files
Excel has a limit on the number of rows. If you open a file containing millions of rows, the file will open, but you won't see more than 1,048,576 rows in Excel.
By contrast, Python can handle millions of rows. The only limitation is the computing power of your PC. Let's see how to use Mito to read a file.
Before we can read a CSV file, we first need to create a Mito spreadsheet. To do this, we run the following code.
import mitosheet
mitosheet.sheet()
Once run, the CSV file can be read, here a dataset containing school grades will be used and then imported as shown below.
After importing, the following code will be generated automatically:
import pandas as pd
StudentsPerformance_csv = pd.read_csv(r'StudentsPerformance.csv')
Mito's Automation
With Excel, you can only automate basic operations, whereas with Mito there are no limitations.
With Mito, you can do more things like send reports via email, send files using WhatsApp, use Google Forms as a basic database, and more.
Let's use Mito to record some actions as if we were using Excel.