df=pd.read_fwf("x",delim_whitespace=True,header=None,keep_default_na=False)
df = df.groupby(0)[8].max()
df
This will output:
0
1 9.42
10 6.69
11 .92
12 1.24
13 .93
14 .66
15 2.91
16 5.12
17 1.64
18 3.41
19 11.52
2 2.43
20 .53
21 3.51
22 3.23
23 4.96
24 25.91
25 16.50
26 .32
27 10.51
28 7.92
29 .90
3 9.84
30 5.46
31 4.29
33 15.26
35 1.48
36 2.74
37 .45
38 3.12
39 .91
4 9.31
42 2.30
45 .85
46 1.90
47 1.17
48 .23
49 .63
5 8.35
54 95.10
6 2.56
7 5.50
8 10.83
9 1.44
Name: 8, dtype: object
however, I would like it to be 1,2,3,4,5,6 and not as shown above:
1,10,11,12,13 etc
Any suggestions?