created aggregations notebook#45
Conversation
| @app.cell | ||
| def _(): | ||
| import polars as pl | ||
|
|
||
| df = pl.read_parquet('../data/sales.parquet') | ||
| df | ||
| return df, pl |
There was a problem hiding this comment.
I'd recommend using a hosted URL for the .parquet file instead of having this locally (as I believe it helps save repo space as we add more topics over the course of time). Personally, I'd recommend HuggingFace (polars + HF works great in marimo):
import polars as pl
# Login using e.g. `huggingface-cli login` to access this dataset
df = pl.read_parquet('hf://datasets/<your-username/<filename>.parquet')| @app.cell | ||
| def _(): | ||
| import polars as pl | ||
|
|
||
| df = pl.read_parquet('../data/sales.parquet') | ||
| df |
There was a problem hiding this comment.
I also seem to be running into this error:
[wasm] polars read_parquet raises AttributeError: type object 'builtins.PyLazyFrame' has no attribute 'new_from_parquet'
pola-rs/polars#20876 (ah, raised by @mscolnick)
This occurs when I'm trying to preview the file directly in our WASM playground using:
https://marimo.app/https://github.com/marimo-team/learn/blob/0d99c6780c727ad698b03deef1f4a31ee8141a47/polars/12_aggregations.py
| @app.cell | ||
| def _(): | ||
| return | ||
|
|
There was a problem hiding this comment.
Just an empty cell here which can be deleted.
|
|
||
| @app.cell(hide_code=True) | ||
| def _(mo): | ||
| mo.md(r"""There's more you can do with aggregations in Polars. We hope that in this notebook, we've armed you with the tools to get started.""") |
There was a problem hiding this comment.
Hyperlinking relevant words in the notebook to the polars docs webpage for easier referencing?
|
Visited the notebook via: https://marimo.app/https://github.com/marimo-team/learn/blob/f42618970f1bbc1d04ffc63f2fb813b33e1caf58/polars/12_aggregations.py; seems to load in the WASM playground. Unchecked the README tickbox in your PR description comment since a README already exists. Great, crisp notebook overall! |
📝 Summary
📋 Checklist
--sandboxREADME.md