filmov
tv
How to Check the First and Last Rows of a Data Frame in Pandas (Python)
Показать описание
↓ Code Available Below! ↓
This video shows how to check the first and last rows of pandas data frame using the both the built in head and tail functions as well as index slicing with iloc. Checking the head and tail of a data frame is a common operation to get a sense of what your data looks like and avoid printing too many rows to the console. It is also a quick way of getting the top n results from a sorted data frame.
If you find this video useful, like, share and subscribe to support the channel!
Code used in this Python Code Clip:
import pandas as pd
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .
This video shows how to check the first and last rows of pandas data frame using the both the built in head and tail functions as well as index slicing with iloc. Checking the head and tail of a data frame is a common operation to get a sense of what your data looks like and avoid printing too many rows to the console. It is also a quick way of getting the top n results from a sorted data frame.
If you find this video useful, like, share and subscribe to support the channel!
Code used in this Python Code Clip:
import pandas as pd
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .