New-streaming engine with_columns
with exclusively scalar output collapses length #20981
Closed
Description
Example showing expected output from the eager engine and new-streaming output
>>> df = pl.DataFrame({"x": [1, 2, 3]})
>>> df.with_columns(pl.col.x.mean())
shape: (3, 1)
┌─────┐
│ x │
│ --- │
│ f64 │
╞═════╡
│ 2.0 │
│ 2.0 │
│ 2.0 │
└─────┘
>>> df.lazy().with_columns(pl.col.x.mean()).collect(new_streaming=True)
shape: (1, 1)
┌─────┐
│ x │
│ --- │
│ f64 │
╞═════╡
│ 2.0 │
└─────┘
Metadata
Assignees
Labels
Type
Projects
Status
Done