================================================================================
  Question 42: Pandas Grouping by School Code & Age Aggregations
================================================================================

FULL QUESTION:
Write a Pandas program to:
1. Split the following DataFrame into groups based on school code.
2. Check and display the type of the GroupBy object.
3. Get the mean, min, and max values of age for each school.

Table Data:
school | class | name           | date_Of_Birth | age | height | weight | address
s001   | V     | Alberto Franco | 15/05/2002    | 12  | 173    | 35     | street1
s002   | V     | Gino Mcneill   | 17/05/2002    | 12  | 192    | 32     | street2
s003   | VI    | Ryan Parkes    | 16/02/1999    | 13  | 186    | 33     | street3
s001   | VI    | Eesha Hinton   | 25/09/1998    | 13  | 167    | 30     | street1
s002   | V     | Gino Mcneill   | 11/05/2002    | 14  | 151    | 31     | street2
s004   | VI    | David Parkes   | 15/09/1997    | 12  | 159    | 32     | street4

SHORT QUESTION:
Groups student dataset by school code, verifies GroupBy object type, and computes mean, min, max age per school.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 42: Pandas Grouping by School Code & Age Aggregations

- Prerequisites: Python 3.x, Pandas (pip install pandas).
- Setup: None.
- How to Run: python question_42.py
- Expected Behavior: Groups by 'School_Code', displays type of GroupBy object, and computes age aggregations.

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

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

student_data = pd.DataFrame({
    'School_Code': ['s001', 's002', 's003', 's001', 's002', 's004'],
    'Class': ['V', 'V', 'VI', 'VI', 'V', 'VI'],
    'Name': ['Alberto Franco', 'Gino Mcneill', 'Ryan Parkes', 'Eesha Hinton', 'Gino Mcneill', 'David Parkes'],
    'Date_Of_Birth': ['15/05/2002', '17/05/2002', '16/02/1999', '25/09/1998', '11/05/2002', '15/09/1997'],
    'Age': [12, 12, 13, 13, 14, 12],
    'Height': [173, 192, 186, 167, 151, 159],
    'Weight': [35, 32, 33, 30, 31, 32],
    'Address': ['street1', 'street2', 'street3', 'street1', 'street2', 'street4']
})

grouped_students = student_data.groupby('School_Code')

print("Type of GroupBy Object:")
print(type(grouped_students))
print("=" * 55)

age_stats = grouped_students['Age'].agg(['mean', 'min', 'max'])

print("Age Statistics (Mean, Min, Max) by School Code:")
print(age_stats)
--------------------------------------------------------------------------------
