Complete the code to select rows where the 'age' column is greater than 30.
filtered_df = df[df['age'] [1] 30]
We use the greater than operator > to select rows where 'age' is more than 30.
Complete the code to select rows where the 'score' column is equal to 100.
perfect_scores = df[df['score'] [1] 100]
The equality operator == checks if 'score' is exactly 100.
Fix the error in the code to select rows where 'height' is less than 170.
short_people = df[df['height'] [1] 170]
The correct operator for 'less than' is <. The option '=>' is invalid syntax.
Fill both blanks to create a dictionary comprehension that maps words to their lengths only if the length is greater than 3.
lengths = {word: [1] for word in words if [2]The dictionary maps each word to its length using len(word). The condition filters words with length greater than 3 using len(word) > 3.
Fill all three blanks to create a dictionary comprehension that maps uppercase words to their scores only if the score is greater than 50.
result = [1]: [2] for word, score in data.items() if [3]
The dictionary keys are uppercase words using word.upper(). The values are scores. The condition filters scores greater than 50.