Back to Modin

Exercise 4: Experimental Features

examples/tutorial/jupyter/execution/pandas_on_dask/local/exercise_4.ipynb

0.37.11.3 KB
Original Source

<center><h2>Scale your pandas workflows by changing one line of code</h2>

Exercise 4: Experimental Features

GOAL: Explore some of the experimental features being added to Modin.

Concept for exercise: Spreadsheet

For those who have worked with Excel, the Spreadsheet API will definitely feel familiar! The Spreadsheet API is a Jupyter notebook widget that allows us to interact with Modin DataFrames in a spreadsheet-like fashion while taking advantage of the underlying capabilities of Modin. The widget makes it quick and easy to explore, sort, filter, and edit data as well as export the changes as reproducible code.

Let's look back at a subset of the 2015 NYC Taxi Data from Exercise 2, and see how the Spreadsheet API can make it easy to play with the data!

python
!jupyter nbextension enable --py --sys-prefix modin_spreadsheet
python
import modin.pandas as pd
import modin.experimental.spreadsheet as mss
from modin.config import Engine
Engine.put("dask")

s3_path = "s3://dask-data/nyc-taxi/2015/yellow_tripdata_2015-01.csv"
modin_df = pd.read_csv(s3_path, parse_dates=["tpep_pickup_datetime", "tpep_dropoff_datetime"], quoting=3, nrows=1000)
python
spreadsheet = mss.from_dataframe(modin_df)
spreadsheet

Thank you for participating!