Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fix this Python code to function correctly: def getBMData ( filename ) : Assumes filename is a fully qualified filename for a
Fix this Python code to function correctly: def getBMDatafilename: Assumes filename is a fully qualified filename for a CSV containing CH MaxStaffed, WSL int CO int rowdate float Returns a dictioary with a list for each variable""" data dataCH dataCO dataMaxStaffed dataWSL datarowdate' f openfilename line freadline while line : split line.split dataMaxStaffedappendsplit dataCHappendsplit dataWSLappendsplit dataCOappendsplit datarowdate'appendsplit line freadline fclose return data import matplotlib.pyplot as plt import numpy as np def makeHistdata numBins, title, xlabel, ylabel: pltclose plthistdata numBins plttitletitle pltxlabelxlabel pltylabelylabel mean npmeandata std npstddata pltannotateMean: strroundmean SD: strroundstd fontsize xy xycoords 'axes fraction' pltshow bmdict getBMDataFPPaygovCOCHcsv makeHistbmdictrowdate' 'Calls Handled for the past months', CH CO
Fix this Python code to function correctly: def getBMDatafilename:
Assumes filename is a fully qualified filename for a CSV containing
CH MaxStaffed, WSL int CO int rowdate float
Returns a dictioary with a list for each variable"""
data
dataCH
dataCO
dataMaxStaffed
dataWSL
datarowdate'
f openfilename
line freadline
while line :
split line.split
dataMaxStaffedappendsplit
dataCHappendsplit
dataWSLappendsplit
dataCOappendsplit
datarowdate'appendsplit
line freadline
fclose
return data
import matplotlib.pyplot as plt
import numpy as np
def makeHistdata numBins, title, xlabel, ylabel:
pltclose
plthistdata numBins
plttitletitle
pltxlabelxlabel
pltylabelylabel
mean npmeandata
std npstddata
pltannotateMean: strroundmean
SD: strroundstd
fontsize
xy
xycoords 'axes fraction'
pltshow
bmdict getBMDataFPPaygovCOCHcsv
makeHistbmdictrowdate' 'Calls Handled for the past months',
CH
CO
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