Python Pandas Viewing and Inspecting Data

Python Pandas Viewing and Inspecting Data


You should first know how to load data in a DataFrame. If you don%u2019t know how to do it please click here. Also, we%u2019ll be using Anaconda which according to Wikipedia is a free and open-source distribution of the Python and R programming languages for scientific computing.


Now that you%u2019ve loaded your data, it%u2019s time to take a look. How does the data frame look? We are going to take data from FIFA 19 players dataset. Running the name of the data frame would give you the entire table, but you can also get  different outcomes by using following methods:

 df.head(n): Shows the first n rows. 

 df.tail(n): Shows the last n rows. 

 df.shape: Would give you the number of rows and columns.  

 df.describe(): To see some of the core statistics about a particular column. 

 df.mean(): Returns the mean of all columns.

df.corr(): Returns the correlation between columns in a data frame. 

 df.count(): Returns the number of non-null values in each data frame column. 

 df.max(): Returns the highest value in each column. 

 df.min(): Returns the lowest value in each column. 

 df.median(): Returns the median of each column. 

 df.std(): Returns the standard deviation of each column.