Pandas DataFrame: tail() function
DataFrame - tail() function
The tail() function is used to get 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:DataFrame.tail(self, n=5)
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 Pandas DataFrame Notebooks from here.
Previous: DataFrame - pop() function
Next: DataFrame - xs() function
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework