Spec-Zone.ru › Polars

polars.Series.rechunk

Series.rechunk(
    *,
    in_place: bool = False,
) → Self

Создать единый блок памяти для этого ряда.

Параметры:
in_place

Выполнять ли операцию на месте.

Примеры

>>> s1 = pl.Series("a", [1, 2, 3])
>>> s1.n_chunks()
1
>>> s2 = pl.Series("a", [4, 5, 6])
>>> s = pl.concat([s1, s2], rechunk=False)
>>> s.n_chunks()
2
>>> s.rechunk(in_place=True)
shape: (6,)
Series: 'a' [i64]
[
    1
    2
    3
    4
    5
    6
]
>>> s.n_chunks()
1

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.rechunk.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API