Complete the code to filter groups where the mean score is greater than 80.
filtered = df.groupby('team').filter(lambda x: x['score'].[1]() > 80)
The mean() function calculates the average score for each group, which is needed to filter groups with mean score above 80.
Complete the code to filter groups where the number of rows is at least 3.
filtered = df.groupby('category').filter(lambda x: len(x) [1] 3)
The condition len(x) >= 3 keeps groups with 3 or more rows.
Fix the error in the code to filter groups where the maximum value in 'value' column is less than 50.
filtered = df.groupby('group').filter(lambda x: x['value'].[1]() < 50)
The max() function finds the highest value in the 'value' column for each group, which is needed to check if it's less than 50.
Fill both blanks to filter groups where the sum of 'points' is greater than 100 and the group size is at least 5.
filtered = df.groupby('team').filter(lambda x: x['points'].[1]() [2] 100 and len(x) >= 5)
The sum() function calculates total points per group, and > checks if it's greater than 100.
Fill all three blanks to create a dictionary of group names and their average 'score' for groups with average score above 70.
result = {group: data['score'].[1]() for group, data in df.groupby('[2]') if data['score'].[3]() > 70}The mean() function calculates average scores. The groupby is done on 'team'. The condition checks if the average score is above 70.