polars.Series.tail

Series.tail(length: Optional[int] = None) polars.internals.series.Series

Get last N elements as Series.

Parameters
length

Length of the tail.

Examples

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