datatable.Frame.tail()¶

tail
(
n=10
)

Return the last n rows of the frame.

If the number of rows in the frame is less than n, then all rows are returned.

This is a convenience function and it is equivalent to DT[-n:, :] (except when n is 0).

Parameters¶

n
int

The maximum number of rows to return, 10 by default. This number cannot be negative.

return
Frame

A frame containing the last up to n rows from the original frame, and same columns.

Examples¶

DT = dt.Frame(A=["apples", "bananas", "cherries", "dates", "eggplants", "figs", "grapes", "kiwi"]) DT.tail(3) 
A
str32
0figs
1grapes
2kiwi