- Import necessary libraries such as
- pandas
- numpy
- os
- Load the school and student data from CSV files into Pandas DataFrames.
- Merge the school and student data into a single DataFrame for comprehensive analysis.
- Calculate key metrics for the entire district, including total number of schools, total students, total budget, average math and reading scores, passing rates for math and reading, and overall passing rate.
- Group the data by school name and calculate metrics for each school, such as school type, total students, total budget, budget per student, average math and reading scores, and passing rates.
- Format the summary data for display.
- Sort schools by overall passing rate and display the top five schools.
- Sort schools by overall passing rate and display the five schools with the lowest performance.
- Calculate and display the average math score for each grade level (9th, 10th, 11th, 12th) at each school.
- Calculate and display the average reading score for each grade level (9th, 10th, 11th, 12th) at each school.
- Create spending bins to categorize schools based on their budget per student.
- Calculate and display the average math and reading scores, as well as passing rates, for each spending category.
- Similar to spending, categorize schools based on their size (number of students) and calculate performance metrics for each category.