Series.
tail
Return the last n rows.
This function returns last n rows from the object based on position. It is useful for quickly verifying data, for example, after sorting or appending rows.
For negative values of n, this function returns all rows except the first n rows, equivalent to df[n:].
df[n:]
Number of rows to select.
The last n rows of the caller object.
See also
DataFrame.head
The first n rows of the caller object.
Examples
>>> psser = ps.Series([1, 2, 3, 4, 5]) >>> psser 0 1 1 2 2 3 3 4 4 5 dtype: int64
>>> psser.tail(3) 2 3 3 4 4 5 dtype: int64