Complete the code to group the DataFrame by 'team' and calculate the mean of 'score' using named aggregation.
result = df.groupby('team').agg({'average_score': ('score', [1])})
The mean function calculates the average of the 'score' column for each group.
Complete the code to group by 'department' and calculate the maximum 'salary' with named aggregation.
summary = df.groupby('department').agg({'max_salary': ('salary', [1])})
The max function finds the highest salary in each department.
Fix the error in the named aggregation to count the number of entries per 'category'.
counts = df.groupby('category').agg({'entry_count': ('id', [1])})
The count function counts the number of non-null entries in the 'id' column for each category.
Fill both blanks to group by 'region' and calculate the minimum and maximum of 'sales' using named aggregation.
agg_sales = df.groupby('region').agg({'min_sales': ('sales', [1]), 'max_sales': ('sales', [2])})
min finds the smallest sales value, and max finds the largest sales value per region.
Fill all three blanks to group by 'category' and calculate the mean of 'price', sum of 'quantity', and count of 'order_id' using named aggregation.
summary = df.groupby('category').agg({'avg_price': ('price', [1]), 'total_quantity': ('quantity', [2]), 'order_count': ('order_id', [3])})
mean calculates average price, sum adds quantities, and count counts orders per category.