3 Python Tools You Need to add to your Workflows

Jake from Mito
3 min readMar 17, 2022

--

https://docs.bokeh.org/en/latest/docs/gallery/lorenz.html

Mito — A spreadsheet interface for Python

Mito is a spreadsheet interface for Python. This means that you can call Mito into your Python environment and each edit you make in the Mito spreadsheet will generate the equivalent Python in the code cell below. Mito is a way to enhance one’s Python ability, but also a way to transition spreadsheet workflows to Python. Doing a pivot table in Mito takes 7 seconds — writing the pandas code for a pivot tables could take a few minutes, if you need to google the syntax.

https://docs.trymito.io/

To install Mito, run these commands:

python -m pip install mitoinstaller
python -m mitoinstaller install

Then open Jupyter Lab and call the Mitosheet:

import mitosheet
mitosheet.sheet()

Here are the full install instructions.

Here is some example pivot table code that is generated:

# Pivoted Airport_Pets_csv into df2
unused_columns = Airport_Pets_csv.columns.difference(set(['Zip']).union(set(['Division'])).union(set({'Zip'})))
tmp_df = Airport_Pets_csv.drop(unused_columns, axis=1)
pivot_table = tmp_df.pivot_table(
index=['Zip'],
columns=['Division'],
values=['Zip'],
aggfunc={'Zip': ['median']}
)

Mito also allows for the creation of interactive charts, which generate the equivalent code.

Mito uses Plotly charts for its visualizations. Plotly is a great package creating interactive charts that are easy to access for a non-technical audience.

Mito also includes:

  • filtering
  • merging
  • sorting
  • summary statistics
  • macros
  • filling null values
  • formulas
  • and more!

2. Lux

Lux — Automated Visualization Suggestions and Generation

Lux allows you to pass in any DataFrame and it will automatically generate related charts that you can choose from by clicking on them — it is an incredibly fast way to make relevant charts.

To install lux:

pip install lux-ap
https://github.com/lux-org/lux

In the gif above, you can see how quickly you can have charts presented to you for you to choose from.

Lux also has an intent feature, where it will only suggest charts for specific columns that you specify.

df.intent = ["Column1","Column2"]
df
https://github.com/lux-org/lux

Bokeh — Create Interactive Visualizations in Python

To start using Bokeh:

import numpy as np from bokeh.io import output_notebook, show
from bokeh.plotting import figure

Bokeh innovates on graphing packages like Matplotlib and Seaborn by creating plots that are interactive for end users.

Here are some of the options they offer:

https://demo.bokeh.org/

Here is the full documentation

The thing that all of these packages share is that they are making Python easier for the more integrated audience, meaning an audience that is doing some Python but also may be a spreadsheet user or a PowerBI user. Data science and Python are increasingly becoming every days tool for those who may not identify as a data scientist. But another thing that all three of these tools do very well is that they ALSO enhance Python for hardcore data people. Each of these tools speeds up Python analysis for even very strong data scientists.

--

--

Jake from Mito
Jake from Mito

Written by Jake from Mito

Exploring the future of Python and Spreadsheets

No responses yet