我有以下数据帧:
Program Version Rand_dist_1 Rand_dist_2 Rand_dist_2
Autocad 1.0 180 120 126
Autocad 1.1 181 125 123
Autocad 1.2 157 125 125
Autocad 2.0 220 201 173
Autocad 2.1 223 126 100
Autocad 2.3 233 334 233
Autocad 2.5 213 232 321
Autocad 3.2 424 312 312
Autocad 3.5 53 1300 112
sketchup 1.0 22 24 21
sketchup 1.3 23 22 19
sketchup 2.4 65 55 39
sketchup 3.0 32 35 33
sketchup 3.3 43 65 56 我有一个随机的距离变量,用来衡量软件版本之间的差异。我想,我如何衡量并不那么重要。我想将以1.0、1.1、1.2开头的软件的第一个版本与以后的版本进行比较。我想找出第一个版本和后续版本之间不等于零的最小距离。我还可以将Rand_dist_1与Rand_dist_2或Rand_dist_3进行比较
逻辑可以是这样的:
Compare Autocad 1.0 version with Autocad 2.0, 2.1, 2.3, 2.5, 3.2, 3.5
Compare Autocad 1.1 version with Autocad 2.0, 2.1, 2.3, 2.5, 3.2, 3.5
Compare Autocad 1.1 version with Autocad 2.0, 2.1, 2.3, 2.5, 3.2, 3.5
(Not I am not comparing the first versions with each other)最终输出应该是这样的:
Program Min_dist
Autocad 1
sketchup 8发布于 2017-05-13 06:33:16
您可以在python上使用collections.Counter或groupBy类。
https://stackoverflow.com/questions/43947182
复制相似问题