我有这样一个数据集:
ID1 ID2
11 22
11 34
22 35
35 9
41 10
52 87
9 65
34 43
我想要一个使用ID1和ID2分配检测重复ID的输出数据集,如下所示:
ID1 ID2 ID3
11 22 ID_11
11 34 ID_11
22 35 ID_11
35 9 ID_11
41 10 ID_10
52 87 ID_87
9 65 ID_11
34 43 ID_1
因为ID11,22,35,9,34
都是相互引用的,所以它们被映射到一个ID,比如ID t 11
Tags:
您没有提供太多信息来清晰地编写此代码,但是在更改一些细节之后,希望此代码能够为您提供解决问题所需的python表达式
相关问题 更多 >
编程相关推荐