polars.Series.limit

Series.limit(num_elements: int = 10) polars.internals.series.Series

Take n elements from this Series.

Parameters
num_elements

Amount of elements to take.

Examples

>>> s = pl.Series("a", [1, 2, 3])
>>> s.limit(2)
shape: (2,)
Series: 'a' [i64]
[
        1
        2
]