This project analyzes school performance across a district using Python, Pandas, and Jupyter Notebook. The analysis involves merging student and school data, performing statistical calculations, and generating summarized insights into school performance based on key metrics such as test scores, student demographics, and school spending.
schools_complete.csv
β Contains school-level data (e.g., school type, budget, and total students).
students_complete.csv
β Contains student-level data (e.g., math and reading scores, grade level, and school name).
school_district_analysis.ipynb
β Contains all Python code for data processing, analysis, and visualization.
pandas_challenge
|ββ PyCitySchools/
| |ββ Resources/
| | |ββ schools_complete.csv
| | |ββ students_complete.csv
| |ββ PyCitySchools.ipynb
|ββ .gitignore
|ββ README.md
β Load school and student datasets using Pandas
β
Merge datasets on "school_name"
to create a unified DataFrame
β Clean and format the data for accurate analysis
β Count total schools, students, and budget
β Calculate average math & reading scores
β Determine percentage of students passing math, reading, and overall
β Categorize each school by type (Public/Charter)
β Compute per-school statistics such as:
-
Total Students
-
School Budget & Per-Student Budget
-
Average Test Scores
-
Percentage of Students Passing
β Identify Top 5 and Bottom 5 performing schools based on overall passing rate
β Analyze math & reading scores for each grade (9thβ12th) at every school
β Categorize schools based on Per Student Budget (e.g., Low, Medium, High Spending)
β Group schools by size (Small, Medium, Large) and compare test scores
β Compare Charter vs. Public Schools based on test performance
Ensure you have the following Python libraries installed:
pip install pandas jupyter
Alternatively, if using Anaconda to run this script install using the following:
conda install pandas jupyter
1οΈβ£ Open the Jupyter Notebook environment in bash:
jupyter notebook
2οΈβ£ Navigate to school_district_analysis.ipynb
3οΈβ£ Restart Kernel and delete previous cell outputs
4οΈβ£ Run all cells sequencially (Kernel
β Run All
)
πΉ Charter Schools Perform Better: Charter schools had higher passing rates in both math and reading compared to public schools.
πΉ Higher Spending β Higher Performance: Schools with lower per-student budgets ($585β$630) had higher test scores compared to schools with higher budgets.
πΉ Smaller Schools Excel: Schools with fewer students (<1000) had higher average test scores than larger schools.
πΉ Grade-Level Trends: 9th and 10th graders tended to score slightly higher in math, while reading scores remained more consistent across grades.