polars.Series.limit#

Series.limit(n: int = 10) Series[source]#

Get the first n rows.

Alias for Series.head().

Parameters:
n

Number of rows to return.

Examples

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