================================================================================
  Question 34: Pandas Employee DataFrame Analytics
================================================================================

FULL QUESTION:
Task:
1. Create a Pandas DataFrame to store details of employees:
   EmployeeID, Name, Department, Salary.
2. Compute the average salary per department.
3. Identify the employee with the highest salary.

SHORT QUESTION:
Analyzes employee payroll data to compute departmental average compensation and identify the highest earner.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 34: Pandas Employee DataFrame Analytics

- Prerequisites: Python 3.x, Pandas (pip install pandas).
- Setup: None.
- How to Run: python question_34.py
- Expected Behavior: Creates Employee DataFrame, groups by Department to compute mean salary, and outputs details of top earner.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_34.py
--------------------------------------------------------------------------------
import pandas as pd

data = {
    "EmployeeID": [101, 102, 103, 104, 105, 106],
    "Name": ["Alice", "Bob", "Charlie", "David", "Eva", "Frank"],
    "Department": ["IT", "HR", "IT", "Finance", "HR", "Finance"],
    "Salary": [75000, 50000, 82000, 95000, 52000, 68000]
}

df = pd.DataFrame(data)

print("Employee DataFrame:")
print(df)
print("=" * 55)

avg_salary_per_dept = df.groupby("Department")["Salary"].mean()

print("Average Salary per Department:")
print(avg_salary_per_dept)
print("=" * 55)

highest_salary_emp = df.loc[df["Salary"].idxmax()]

print("Employee with the Highest Salary:")
print(f"ID         : {highest_salary_emp['EmployeeID']}")
print(f"Name       : {highest_salary_emp['Name']}")
print(f"Department : {highest_salary_emp['Department']}")
print(f"Salary     : {highest_salary_emp['Salary']}")
--------------------------------------------------------------------------------
