Welcome back.
We visualized our data frame and we succeeded in creating this table.
Now let's explore our data use build a methods to quickly understand your data.
Again guys, trust me, when working with simple tables it's very clear.
It's obvious that that Diana has the highest grade.
But when working with thousands and hundreds of rows and columns, it would be a very complex and complicated
step.
So what things we can do with our data?
Let me display the first two rows.
So I use the f.
This is the data frame that we created before dot head.
And we pass to.
This includes first two rows.
Let me run and see that the first two rows Alice and Bob.
Those are the first two rows zero and one.
If I need the last two rows so I can use df dot tail to and this is the last two rows.
Charlie and Diana, if I need to get data set info.
What the what this means df.info data set info provides a concise summary of the data frame, including
data types of each column, number of non-null values, memory usage, and number of rows and columns.
Okay, so let me run and see the output.
Here we have the data set info class pandas data frame range index.
For entries 0 to 3 we have four rows.
The data columns total four columns.
We have name, age, city, and grade.
And you can notice that zero, one, two and three name, age, city and grade null null null null and
others.
And here we have the data type for the name is object, which is the string integer 64 for age.
Object for the city, which is string and integer 64 for decades.
Data types.
Integers two and objects two for the columns and memory usage.
260 bytes.
Okay, this is how we get the information about the data set.
So the range index five entries or four entries 0 to 3.
We have four rows with index 0 to 3 data columns four columns in total.
And others we don't have the null null.
They are not null null null values.
Nothing with null null values.
Now let me use another like ready made and included function in that data frame which is describe function.
We get basic statistics df dot describe.
This will generate descriptive statistics for numerical columns.
Count mean standard deviation, minimum maximum values, percentiles 25%, 50, 75 and others.
Scroll down to get those basic statistics.
We have two columns that works with integers, so age and grade.
This will generate statistical data for those numerical columns.
Age and grades count for mean 20.5.
Standard deviation 1.29.
Minimum 1,925% 19.7 50%, 75%, and maximum 22.
Also, this is for the grade.
Okay, so you can see how powerful is this library.
It calculates all those statistics with one click and one command called df dot describe.
Okay.
So this is how we quickly understand and use the methods to understand our data and get statistics about.