Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left
01 D 15 H : 26 M : 15 S Apply NowNow 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.
Please login to comment
Be the first one to comment!