import os
import csv
csvfile = file('????.csv','rb')
spamreader = csv.reader(csvfile)
datalist = []
for row in spamreader:
if row[0] == 'InvoiceID':
global keylist
keylist =row
continue
elif row[3] == 'Rounding':
global Rounding
Rounding = row[18]
continue
elif row[3] == 'InvoiceTotal':
global InvoiceTotal
InvoiceTotal = row[18]
continue
elif row[3] == 'StatementTotal':
global StatementTotal
StatementTotal = row[18]
continue
else:
datalist.append(row[18])
mincost = 0.0000000
for cost in datalist:
if cost > mincost:
mincost = cost
print cost
查詢日誌文件最大值,過濾一些無用
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.