python获取excel表格中的某一列的最大值
cpu内存12422532642752862973083193210331134123513361437153816391740184119422043214422452...
cpu 内存
1 24
2 25
3 26
4 27
5 28
6 29
7 30
8 31
9 32
10 33
11 34
12 35
13 36
14 37
15 38
16 39
17 40
18 41
19 42
20 43
21 44
22 45
23 46
24 47
25 48
26 49
27 50
28 51
29 52
30 53
31 54
32 55
33 56
34 57
35 58 展开
1 24
2 25
3 26
4 27
5 28
6 29
7 30
8 31
9 32
10 33
11 34
12 35
13 36
14 37
15 38
16 39
17 40
18 41
19 42
20 43
21 44
22 45
23 46
24 47
25 48
26 49
27 50
28 51
29 52
30 53
31 54
32 55
33 56
34 57
35 58 展开
1个回答
展开全部
试试以下代码:
data = []
with open('data.xls') as f:
for line in f: # loop over the rows
fields = line.split() # parse the columns
rowdata = map(float, fields) # convert text to numbers
data.extend(rowdata) # accumulate the results
print 'Minimum:', min(data)
print 'Maximum:', max(data)
data = []
with open('data.xls') as f:
for line in f: # loop over the rows
fields = line.split() # parse the columns
rowdata = map(float, fields) # convert text to numbers
data.extend(rowdata) # accumulate the results
print 'Minimum:', min(data)
print 'Maximum:', max(data)
更多追问追答
追问
看不懂
追答
采纳啊
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询