Skip to content

Commit

Permalink
fix: polars test case
Browse files Browse the repository at this point in the history
  • Loading branch information
longxiaofei committed Jul 2, 2024
1 parent 930ed98 commit 7a846a1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/stress-test-polars.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down

0 comments on commit 7a846a1

Please sign in to comment.