Mito Turns Spreadsheet Workflows into Python
Mito is an open source Python package that allows the user to generate Python by editing a spreadsheet. Each step the user takes in the Mito spreadsheet generates the equivalent Python in the code cell below.
To install Mito, use these three commands:
python -m pip install mitoinstaller
python -m mitoinstaller install
Then to open the Mitosheet interface:
import mitosheet
mitosheet.sheet()
Here is a link to the full install instructions.
Below is an overview of some of Mito’s commonly used features:
Graphing
Graphing in Mito is designed to help you build intuition about your data and create presentation-ready graphs to communicate insights. Mito creates interactive and customizable graphs using the Plotly Express open source graphing library.
Like everything in Mito, when you create a graph, Mito generates the equivalent Python code so have complete control of your analysis.
The graph types Mito supports are:
- Scatter plots
- Line charts
- Bar charts
- Histograms
- Box plots
- Violin plots
- Strip plots
- Density heatmaps
- Density Countour maps
- ECDF (Emprical Cumulative Distribution Function) graphs
VLOOKUP
Open the Merge Taskpane by clicking Dataframe > Merge Dataframes
. Then, configure the merge taskpane:
- Select the Merge Type:
- Left Merge: Includes all rows from the first sheet and only matching rows from the second sheet. Includes all matches.
- Right Merge: Includes all rows from the second sheet and only matching rows from the first sheet. Includes all matches.
- Inner Merge: Only includes rows that have matches in both sheets.
- Outer Merge: Includes all rows from both sheets, regardless of if there is a match in the other sheet.
- Lookup Merge: Left join, but only includes the first match from the second sheet if there are multiple. Just like a Vlookup in Excel.
- Unique in Left: Includes each row from the first sheet that doesn’t have a match in the second sheet.
- Unique in Right: Includes each row from second sheet that doesn’t have a match in the first sheet.
2. Set the merge keys. These are the keys that must match for the rows to be merged. You can create as many merge keys as you want.
3. Then, optionally choose which columns from each dataset you want to keep in the final merge dataframe.
Filtering
Mito provides powerful filtering through a combination of filters and filter groups.
- Filters are a single condition that evaluates to true or false for each cell in the column.
- Filter Groups are aggregations of filters combined with an And/Or.
To access Mito’s column filters, click on the filter button in the column header, and then click the Add Filter dropdown.
Mito’s filters are acceptive, meaning that only cells where the filter conditions are met will remain in the dataset.
Summary Statistics
Mito’s column summary statistics are a quick and easy way of understanding column data. By default, Mito displays a histogram of the frequency of values in the column along with the result of using the .describe pandas function.
To access Mito’s Summary Statistics, open the column control panel by clicking on the filter icon in the column header, and then selecting the Summary Statistics tab.