Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!


Now, suppose we want to look at a particular row of our data frame. All we need to do is provide the index of the row in brackets, followed by a comma. For example, to extract the second row, we’d write:

people[2, ]

Just like vectors, rows in a data frame are indexed from 1.


Extract the first row of the cars data frame.

Stuck? Here's a hint!


cars[1, ]