Final Quiz
Assess your understanding of key selection and filtering concepts in Pandas with this final quiz. Reinforce your data analysis skills and prepare for upcoming lessons on grouping DataFrames.
We'll cover the following...
We'll cover the following...
Final Quiz: Filtering DataFrames
1.
Which of these is the correct syntax to combine multiple filters, such as artists with plays > 100, or artists from the UK with names starting with Th?
A.
df[df.plays > 100 | df.country == 'UK' & df.name.str.startswith('TH')]
B.
df[(df.plays > 100) | ( (df.country == 'UK') & (df.name.str.startswith('Th') )]
C.
df[df.plays > 100 | (df.country == 'UK' & df.name.str.startswith('TH'))]
1 / 3
...