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!


Extracting columns from a data frame is just as simple as retrieving rows. Recall that indexes listed before the comma in the bracket operator are used for rows. In a similar fashion, indexes listed after the comma are used to denote the column you’d like to retrieve. In this case, we start with a comma and then provide the index of the column we want to retrieve:

people[ ,1]


Retrieve the second column from the cars data frame.

Stuck? Here's a hint!


cars[ ,2]