We have 398 rows and eight columns.
This is big data.
So let's understand data.
Create a new code.
And here we need to get the basic information about the data set.
Start with print data set info and use dataset.info function run.
And here we go.
We get that our data columns are eight range index from 398 entries from 0 to 397.
And here we have our data.
We have the columns now one null count and data type.
So the MPG is float64 cylinders is integer displacement float horsepower float weight float acceleration
float and model year is integer and origin is integer.
So we understand that data types of our columns.
Data types.
We have five floats and three integers, and memory usage is 25 kilobyte.
And this is our data.
Now let's get the missing values.
So here print missing values.
Printing missing values using dataset dot is n a.
This line of code prints the count of missing and not available or not assigned values for each column
in the data frame.
Run it again and here we go.
The missing values for the MPG.
Nothing.
Cylinders.
Displacement.
Horsepower is six and the other are zeros.
The data type is int 64.
If we go to the, uh the horsepower, we will find six values six not available values.
So this data set dot is na dot some creates a boolean data frame of the same shape as data set.
Each cell contains true if the value is missing, not available, false otherwise, and dot.
Some.
Here sums the true values which count as one for each column.
False counts zero.
Returning a series with column names as index and missing value counts as value.
So in this case we get five six missing values in the horsepower column.
So if we go to here we search our data set.
We will get six missing values in the horsepower.
Okay.
We don't need to import missing values and missing data.
So I'm gonna delete those six values.
To do that here we are going to create a new cell and handle missing values.
Start with print before handling and dropping before dropping.
Not available data set.
Dot shape.
Data set.
Drop not available.
And after dropping.
Give me the data shape.
Run!
And here we go.
Before dropping, we have 398 rows and eight columns.
After dropping, we have 392 rows and eight columns, so the six not available values from the horsepower
are being removed completely.
So the complete row like this will be removed from our data set.
So our data now contains 392 rows with eight columns and without no no values or not available values.