Final Quiz
This quiz is to make sure you have fully grasped the concept of filtering 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
Hopefully, you got the ...