polars.Series.chunk_lengths#
- Series.chunk_lengths() list[int] [source]#
Get the length of each individual chunk.
Examples
>>> s = pl.Series("a", [1, 2, 3]) >>> s2 = pl.Series("a", [4, 5, 6])
Concatenate Series with rechunk = True
>>> pl.concat([s, s2], rechunk=True).chunk_lengths() [6]
Concatenate Series with rechunk = False
>>> pl.concat([s, s2], rechunk=False).chunk_lengths() [3, 3]