diff --git a/tests/stress-test-polars.ipynb b/tests/stress-test-polars.ipynb index b3b59a26..039e3b38 100644 --- a/tests/stress-test-polars.ipynb +++ b/tests/stress-test-polars.ipynb @@ -45,15 +45,16 @@ "outputs": [], "source": [ "import polars as pl\n", - "df = pl.scan_csv('./bike_sharing_dc.csv', try_parse_dates = True)\n", - "strange_name = f\"{''.join(chr(i) for i in range(1, 256))}\"\n", + "\n", + "df = pl.scan_csv('./bike_sharing_dc.csv', try_parse_dates=True)\n", + "strange_name = ''.join(chr(i) for i in range(1, 256))\n", "df = df.select([\n", " pl.col(\"date\").alias(strange_name),\n", " pl.col(\"*\")\n", "])\n", - "df = df.fetch(10)\n", - "df = df.with_columns( [\n", - " pl.lit(df[\"holiday\"].set_at_idx(1,strange_name)),\n", + "df = df.head(10).collect()\n", + "df = df.with_columns([\n", + " pl.lit(df[\"holiday\"].scatter(1, strange_name)),\n", "])\n", "df" ]