Complete the code to filter rows where the 'age' column is greater than 30.
filtered_data = data[data['age'] [1] 30]
The '>' operator filters rows where the 'age' is greater than 30.
Complete the code to filter rows where the 'score' column is equal to 100.
perfect_scores = data[data['score'] [1] 100]
The '==' operator checks for exact equality, selecting rows where 'score' is 100.
Fix the error in the code to filter rows where 'height' is less than or equal to 170.
short_people = data[data['height'] [1] 170]
The correct operator for 'less than or equal to' is '<='.
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 filter keeps 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 0.
result = [1]: [2] for [3], [2] in data.items() if [2] > 0
k.lower() instead of k.upper() for keys.k as the value instead of v.v as the loop variable instead of k.The dictionary keys are uppercase versions of k using k.upper(). The values are v. The loop variable is k from data.items(). The filter keeps items where v is greater than 0.