polars.Expr.rechunk
-
Create a single chunk of memory for this Series.
Examples
>>> df = pl.DataFrame({"a": [1, 1, 2]})Create a Series with 3 nulls, append column
a, then rechunk.>>> df.select(pl.repeat(None, 3).append(pl.col("a")).rechunk()) shape: (6, 1) ┌────────┐ │ repeat │ │ --- │ │ i64 │ ╞════════╡ │ null │ │ null │ │ null │ │ 1 │ │ 1 │ │ 2 │ └────────┘
Expr.rechunk() → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.rechunk.html