I'm following this tutorial to select specific rows and columns from a DataFrame.
The tutorial example shows that you can use: adult_names = titanic.loc[titanic["Age"] > 35, "Name"]
to obtain:
1 Cumings, Mrs. John Bradley (Florence Briggs Th...
6 McCarthy, Mr. Timothy J
11 Bonnell, Miss. Elizabeth
13 Andersson, Mr. Anders Johan
15 Hewlett, Mrs. (Mary D Kingcome)
Name: Name, dtype: object
However, if I want to access Miss. Elizabeth Bonnell, I'd have to use adult_names[11] (even though she's the 3rd name older than 35).
Is there a way to populate an array with these values so that the first name would be in adult_names[0], the second name would be in adult_names[1], the third name would be in adult_names[2], etc.?