Last updated
Find the average performance score and total projects completed by each department using Python and Pandas.
Find the average performance score and total projects completed by each department using Python and Pandas.
Your dataset contains an employee_performance DataFrame with employee, department, completed projects, and performance score data.
| Column | Type | Key / Notes |
|---|---|---|
| employee_id | INT | Unique employee ID |
| employee_name | VARCHAR(50) | Employee name |
| department | VARCHAR(50) | Department name |
| projects_completed | INT | Number of completed projects |
| performance_score | FLOAT | Employee performance score |
employee_performance — 8 rows
| employee_id | employee_name | department | projects_completed | performance_score |
|---|---|---|---|---|
| 101 | Alice | HR | 8 | 82 |
| 102 | Bob | IT | 12 | 91 |
| 103 | Charlie | HR | 6 | 76 |
| 104 | David | Finance | 10 | 88 |
| 105 | Eva | IT | 15 | 95 |
| 106 | Frank | Finance | 7 | 81 |
| 107 | Grace | IT | 11 | 89 |
| 108 | Henry | HR | 9 | 84 |
Performance Analysis: What is the average performance score and total projects completed by each department?
Your output should look like this (partial example):
| department | average_performance_score | total_projects_completed |
|---|---|---|
| Finance | 84.50 | 17 |
| HR | 80.67 | 23 |
| ... | ... | ... |