Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left

  Apply Now

End-to-End ML Project- Beginner friendly

28 / 94

Explore the Dataset

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).

INSTRUCTIONS
  • Run the 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.

Get Hint See Answer

Loading comments...