The file cps.csv (attached) contains school profile information for Chicago Public Schools. Your program will derive some data from it and then generate some statistical information.
You are to create a program in Python that performs the following:
- Loads the cps.csv file (assume it’s in the current directory) and create a DataFrame object from it.
- Based on the data contained in the cps.csv file, generates a dataframe with the following information:
- Lowest Grade Offered (derived from Grades_Offered_All column)
- Highest Grade Offered (derived from Grades_Offered_All column)
- Starting Hour (derived from School_Hours column)
The values for a-g are based on existing columns in the data. For h-j, you will need to generate new columns which derives information from existing ones.
Replace the missing numeric values with the mean for that column.
Display the first 10 rows of this dataframe.
- Displays the following information:
- Mean and standard deviation of College Enrollment Rate for High Schools
- Mean and standard deviation of Student_Count_Total for non-High Schools
- Distribution of starting hours for all schools
- Number of schools outside of the Loop Neighborhood (i.e., outside of zip codes 60601, 60602, 60603, 60604, 60605, 60606, 60607, and 60616)
- The name of your source code file should be py. All your code should be within a single file.
- You need to use the pandas DataFrame object for storing data.
- Your code should follow good coding practices, including good use of whitespace and use of both inline and block comments.
- You need to use meaningful identifier names that conform to standard naming conventions.
- At the top of each file, you need to put in a block comment with the following information: your name, date, course name, semester, and assignment name.
What to Turn In
You will turn in the single DataStats.py file using BlackBoard.
Sample Program Output
Distribution of Starting Hours should be: