polars.Series.rechunk#
- Series.rechunk(*, in_place: bool = False) Self [source]#
Create a single chunk of memory for this Series.
- Parameters:
- in_place
In place or not.
Examples
>>> 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