Question: 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
