Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
How do you select a single column named 'Age'?
Remember the single brackets for selecting a single column.
What code would you use to select the first row of a DataFrame?
Think about which index corresponds to the first position.
What method do you use to select a specific column from a DataFrame?
Focus on how you reference a column in a DataFrame.
True or False: iloc allows you to select data by column names.
Think about whether iloc uses names or indices.
Given a DataFrame with student marks, write the code to select the first four rows and the columns 'Name' and 'Marks'.
Think about how to combine both row and column selection.
How would you modify your code to select all rows for the 'Weekly_Study_Hours' column if you can only access the full DataFrame?
Remember that ':' can denote all rows in selections.
5 more questions in this section. Enroll free to practise them all.
Enroll free