Extract magic row limit variable

This commit is contained in:
Marty Oehme 2025-09-28 19:34:43 +02:00
parent 83dfce1a61
commit ed7ed620d4
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -13,6 +13,8 @@ with app.setup:
import marimo as mo
import polars as pl
LIMIT_ROWS = 200
@app.cell(hide_code=True)
def _():
@ -111,7 +113,7 @@ def _():
def _():
df = (
pl.scan_ndjson("data/daily/*", include_file_paths="file")
.head(200) # FIXME: take out after debug
.head(LIMIT_ROWS) # FIXME: take out after debug
.with_columns(
pl.col("file")
.str.replace(r"data/daily/(\d{4}-\d{2}-\d{2}).json", "${1}")