我有一个如下所示的数据框。我想删除重复出现的键元组 ( Parameter
, Value
) 并选择具有最小值的那个mse
。
> df
mse Parameter Value
1 25.86760 Training_size 100
2 8.42944 Training_size 200
3 58.80860 Training_size 300
4 34.37760 Training_size 400
5 99.61530 Training_size 500
6 19.77290 Training_size 600
7 24.76670 Training_size 700
8 587.96900 Training_size 800
9 538.02500 Training_size 900
10 60.39630 Training_size 1000
11 137.07600 Training_size 2000
12 62.05740 Training_size 3000
13 8.44762 Training_size 200
14 8.44610 Training_size 200
15 8.44871 Training_size 200
16 8.42939 Training_size 200
17 11.78550 Training_size 200
18 11.78520 Training_size 200
19 1726.44000 Training_size 200
20 1726.44000 Training_size 200
21 1726.43000 Training_size 200
22 8.42939 Training_size 200
23 8.42942 Training_size 200
24 8.42939 Training_size 200
25 8.42938 Training_size 200
我想改为:
mse Parameter Value
1 25.86760 Training_size 100
3 58.80860 Training_size 300
4 34.37760 Training_size 400
5 99.61530 Training_size 500
6 19.77290 Training_size 600
7 24.76670 Training_size 700
8 587.96900 Training_size 800
9 538.02500 Training_size 900
10 60.39630 Training_size 1000
11 137.07600 Training_size 2000
12 62.05740 Training_size 3000
25 8.42938 Training_size 200
我怎样才能做到这一点?