w3resource

Pandas Series: tail() function

Series-tail() function

The tail() function is used to 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.

Syntax:

Series.tail(self, n=5)
Pandas Series tail image

Parameters:

Name Description Type/Default Value Required / Optional
n Number of rows to select. int<
Default Value: 5
Required

Returns: type of caller
The last n rows of the caller object.

Example:


Download the above Notebook from here.



Inviting useful, relevant, well-written and unique guest posts