In Polars 0.13.14, I could create a DataFrame
with an all-constant column like this:
import polars as pl
pl.DataFrame(dict(x=pl.repeat(1, 3)))
# shape: (3, 1)
# ┌─────┐
# │ x │
# │ --- │
# │ i64 │
# ╞═════╡
# │ 1 │
# ├╌╌╌╌╌┤
# │ 1 │
# ├╌╌╌╌╌┤
# │ 1 │
# └─────┘
But in Polars 0.13.15, this is an error
ValueError: Series constructor not called properly.
How do I fill a column with a value in polars?