As of Pyodide 0.27.0 (1-Jan-2025), Polars is now supported directly in Pyodide, which means it can be run from a marimo WebAssembly notebook.
This would replace the current static notebook that is hosted on GitHub pages with an interactive notebook, so users don't need to install anything to work through this tutorial.
Implementation adjustments
- I'll need to update the code to download the NYC Yellow Taxi Trip Data
- Good news:
- More work needed:
- httpx encounters errors when running the data downloading code
- I could investigate the cause of the errors and resolve them; or consider using pyodide.http.pyfetch (which is also asynchronous) to get around the errors
- Rather than download all data at once, I could demonstrate direct usage of Polars'
scan_parquet() function to get data straight from the NYC Trip Data page without first saving it to the local filesystem
- I tested that today and ran into some errors related to Polars LazyFrame operations. Note that
pl.read_parquet() (eager mode vs. lazy) also encounters the same error.
As of Pyodide 0.27.0 (1-Jan-2025), Polars is now supported directly in Pyodide, which means it can be run from a marimo WebAssembly notebook.
This would replace the current static notebook that is hosted on GitHub pages with an interactive notebook, so users don't need to install anything to work through this tutorial.
Implementation adjustments
scan_parquet()function to get data straight from the NYC Trip Data page without first saving it to the local filesystempl.read_parquet()(eager mode vs. lazy) also encounters the same error.