What is the average value of the numbers in the field [quant] in the range (198) and (272) inclusive
quant
95
189
176
200
177
340
205
203
284
88
109
83
360
67
250
56
111
439
354
143
this is the code that i tried. Above is the [quant] field from where i need to find the average.
word_file = open('300000a.csv','r')
firstLine = True
for line in word_file:
if firstLine:
firstLine = False
continue
line = line.strip()
line = line.split (",")
field = int(line[0])
TotalMetalCount +=1
if field >198 or field <272:
metalCounts += 1
else:
metalCounts = 1
countT +=1
if field >198 or field <272:
count += 1