Login using Social Account
     Continue with GoogleLogin using your credentials
Now we will explore the dataset. Let's look at the top five rows using DatFrame's head()
method. Its syntax is as-
data_frame.head()
where data_frame
is the name of the DataFrame object which in our case is housing
. By default, it will show the top 5 rows but you can specify any number of rows. For example, we can display the top 10 rows like data_frame.head(10)
.
head()
method for our dataset.After running head()
, you will be able to see the structure of our dataset. Each row here represents one block. There are 10 attributes in our dataset, which include, longitude, latitude, housing_median_age, median_income, and many others. The attributes' names themselves are self-explanatory about what they store.
You can visit attributes_description for understanding better what each attribute means.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Loading comments...