Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Here is the assignment Given the file name of a . tsv file read from user input containing student names and the respective course assignment
Here is the assignment Given the file name of a tsv file read from user input containing student names and the respective course assignment grades, complete a program that performs the following tasks: Read the input file as a pandas dataframe. Output the students' names and grades in descending order of Finals scores. Output each assignment's max score. Output the median and average of each assignment's scores. Output the standard deviation of each assignment's scores. NOTES: Steps through should only require one function for each step. Ex Finding the max of each assignment uses max Append tostring to the end of the function call in order to silence an extraneous line that occurs at the end of the output. For steps and the functions used will require the parameter numericonlyTrue to be passed to specify that only numbers will be calculated as the input file contains strings for student names here is my code import pandas as pd filename input df pdreadcsvfilename, delimitert sorteddf dfsortvaluesby'Final', ascendingFalse sorteddfresetindexdropTrue, inplaceTrue printsorteddftostringindexTrue print Max Scores:" maxscores dfmaxnumericonlyTrue printmaxscores.tostring print Median Scores:" medianscores dfmediannumericonlyTrue printmedianscores.tostring print Average Scores:" averagescores dfmeannumericonlyTrue, axis printaveragescores.tostring print Standard Deviation:" stddev dfstdnumericonlyTrue printstddev.tostring HLname Fname Midterm Midterm Final Bradshaw Reagan Charlton Caius Barrett Edan Stern Brenda Mayo Tyrese Max Scores: Midterm Midterm Final Median Scores: Midterm Midterm Final Average Scores: Midterm Midterm Final Standard Deviation: Midterm Midterm Final butLname Fname Midterm Midterm Final Bradshaw Reagan Charlton Caius Barrett Edan Stern Brenda Mayo Tyrese Max Scores: Midterm Midterm Final Median Scores: Midterm Midterm Final Average Scores: Midterm Midterm Final Standard Deviation: Midterm Midterm Final Here is my output with the minor error of the numbering
Here is the assignment
Given the file name of a tsv file read from user input containing student names and the respective course assignment grades, complete a program that performs the following tasks:
Read the input file as a pandas dataframe.
Output the students' names and grades in descending order of Finals scores.
Output each assignment's max score.
Output the median and average of each assignment's scores.
Output the standard deviation of each assignment's scores.
NOTES:
Steps through should only require one function for each step. Ex Finding the max of each assignment uses max
Append tostring to the end of the function call in order to silence an extraneous line that occurs at the end of the output.
For steps and the functions used will require the parameter numericonlyTrue to be passed to specify that only numbers will be calculated as the input file contains strings for student names
here is my code
import pandas as pd
filename input
df pdreadcsvfilename, delimitert
sorteddf dfsortvaluesby'Final', ascendingFalse
sorteddfresetindexdropTrue, inplaceTrue
printsorteddftostringindexTrue
print
Max Scores:"
maxscores dfmaxnumericonlyTrue
printmaxscores.tostring
print
Median Scores:"
medianscores dfmediannumericonlyTrue
printmedianscores.tostring
print
Average Scores:"
averagescores dfmeannumericonlyTrue, axis
printaveragescores.tostring
print
Standard Deviation:"
stddev dfstdnumericonlyTrue
printstddev.tostring
HLname Fname Midterm Midterm Final
Bradshaw Reagan
Charlton Caius
Barrett Edan
Stern Brenda
Mayo Tyrese
Max Scores:
Midterm
Midterm
Final
Median Scores:
Midterm
Midterm
Final
Average Scores:
Midterm
Midterm
Final
Standard Deviation:
Midterm
Midterm
Final
butLname Fname Midterm Midterm Final
Bradshaw Reagan
Charlton Caius
Barrett Edan
Stern Brenda
Mayo Tyrese
Max Scores:
Midterm
Midterm
Final
Median Scores:
Midterm
Midterm
Final
Average Scores:
Midterm
Midterm
Final
Standard Deviation:
Midterm
Midterm
Final
Here is my output with the minor error of the numbering
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