tail(self: 'NDFrameT', n: 'int' = 5) -> 'NDFrameT'
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:]
.
Number of rows to select.
The last n
rows of the caller object.
Return the last n
rows.
DataFrame.head
The first :None:None:`n`
rows of the caller object.
>>> df = pd.DataFrame({'animal': ['alligator', 'bee', 'falcon', 'lion',
... 'monkey', 'parrot', 'shark', 'whale', 'zebra']})
... df animal 0 alligator 1 bee 2 falcon 3 lion 4 monkey 5 parrot 6 shark 7 whale 8 zebra
Viewing the last 5 lines
This example is valid syntax, but we were not able to check execution>>> df.tail() animal 4 monkey 5 parrot 6 shark 7 whale 8 zebra
Viewing the last n
lines (three in this case)
>>> df.tail(3) animal 6 shark 7 whale 8 zebra
For negative values of n
>>> df.tail(-3) animal 3 lion 4 monkey 5 parrot 6 shark 7 whale 8 zebraSee :
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them