Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DATA - 5 1 1 0 0 : Statistical Programming Programming Assignment 5 Data Preparations and Statistics Introduction The file cps . csv ( attached
DATA: Statistical Programming Programming Assignment Data Preparations and Statistics Introduction The file cpscsv attached contains school profile information for Chicago Public Schools. Your program will derive some data from it and then generate some statistical information. Requirements You are to create a program in Python that performs the following: Loads the cpscsv file assume it's in the current directory and create a DataFrame object fromit. Based on the data contained in the cpscsv file, generates a dataframe with the following information: a SchoolID b ShortName c IsHighSchool d Zip e StudentCountTotal f CollegeEnrollmentRateSchool g Lowest Grade Offered derived from GradesOfferedAll column h Highest Grade Offered derived from GradesOfferedAll column i Starting Hour derived from SchoolHours column The values for af are based on existing columns in the data. For gi 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 rows of this dataframe. Displays the following information: a Mean and standard deviation of College Enrollment Rate for High Schools b Mean and standard deviation of StudentCountTotal for nonHigh Schools c Distribution of starting hours for all schools d Number of schools outside of the Loop Neighborhood ie outside of zip codes and Additional Requirements The name of your source code file should be DataStats.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 as well as a screenshot of your outputs using BlackBoard. Sample Program Output
DATA: Statistical Programming
Programming Assignment Data Preparations and Statistics
Introduction
The file cpscsv attached contains school profile information for Chicago Public Schools. Your program will
derive some data from it and then generate some statistical information.
Requirements
You are to create a program in Python that performs the following:
Loads the cpscsv file assume it's in the current directory and create a DataFrame object fromit.
Based on the data contained in the cpscsv file, generates a dataframe with the following information:
a SchoolID
b ShortName
c IsHighSchool
d Zip
e StudentCountTotal
f CollegeEnrollmentRateSchool
g Lowest Grade Offered derived from GradesOfferedAll column
h Highest Grade Offered derived from GradesOfferedAll column
i Starting Hour derived from SchoolHours column
The values for af are based on existing columns in the data. For gi 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 rows of this dataframe.
Displays the following information:
a Mean and standard deviation of College Enrollment Rate for High Schools
b Mean and standard deviation of StudentCountTotal for nonHigh Schools
c Distribution of starting hours for all schools
d Number of schools outside of the Loop Neighborhood ie outside of zip codes
and
Additional Requirements
The name of your source code file should be DataStats.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 as well as a screenshot of your outputs using BlackBoard.
Sample Program Output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started