Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
Write a command to filter a DataFrame called 'df' for rows where 'Age' is greater than 20.
Use a comparison operator on the 'Age' column.
How can you check which students are younger than 18 from the same DataFrame?
Remember to use the less than operator!
What method is used to filter rows in a DataFrame?
Think about conditional selection.
True or False: To filter data, we can use conditions based on multiple columns.
Consider how you would select data based on more than one criterion.
You have a dataset of sales transactions. Write a command to filter the dataset to show transactions greater than $200 and with a quantity sold over 5.
You'll need to combine two conditions to achieve this filtering.
Given a DataFrame 'df' with various student data, write a logical statement to filter students who are between 18 and 30 years old and have grades higher than 80.
Make sure to include all three conditions appropriately.
5 more questions in this section. Enroll free to practise them all.
Enroll free