我正在尝试计算表格中一系列idsofInterest的众数,每个idsofInterest都有相应的valueOfInterest:
idsOfInterest | valueOfInterest
2 | 1A
2 | 1A
2 | 3B
1 | 2A
1 | 2C
1 | 2A
4 | 3B
4 | 3B
4 | 4C
但是有数百万行。
每个idOfInterest列表都足够长,不会出现多模问题。理想情况下,我希望得到类似于
idsOfInterest | modeValueOfInterest
1 | 2A
2 | 1A
3 | 3C
4 | 3B