polars.Expr.rechunk
-
Создать единый блок памяти для этой Series.
Примеры
>>> df = pl.DataFrame({"a": [1, 1, 2]})Создать Series с 3 значениями null, добавить столбец
a, затем выполнить перегруппировку.>>> 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