【发布时间】:2016-05-15 01:30:43
【问题描述】:
我有一个这样的数据集
users b c d product
8fa683e59c02c04cb781ac689686db07 ggstart 1.46276E+12 00:00.0 55107008
335644267c1d5f04eaea7bc6f51b1861 ggstart 1.46276E+12 00:00.0 55107008
ca3071aad676bc963795a2b09635cdf0 ggstop 1.46277E+12 00:00.0 55107008
17412dec7d3d02c9b0b1c3d1c3571c5c ggstop 1.46276E+12 00:00.0 10655437
f81167c854f1a0c86cab6188f9995824 ggstart 1.46276E+12 00:00.1 55107008
17412dec7d3d02c9b0b1c3d1c3571c5c ggstart 1.46276E+12 00:00.1 10655437
a2659df45c8d05f326225fa5b1063ac9 ggstart 1.46276E+12 00:00.1 30900473
b8bbef76f8dfee2fe190a283cd5a19a7 ggstart 1.46276E+12 00:00.1 18121481
e8ebfc3f39512eda3aa0702b13ffed63 ggstart 1.46276E+12 00:00.1 18121481
988e4873861347113519fbee6dd1c3b0 ggstart 1.46276E+12 00:00.2 55107008
583361d66ad8b0827cd08d3a5d64af89 ggstop 1.46276E+12 00:00.2 55107008
users, b,c,product 是列。
我必须确定每个产品由多少唯一用户购买。这样的行数以千计。 请记住:
there can be many users buying the same product,
each customer have more than one product bought
首先我尝试制作独特用户和独特产品的矩阵。但我只有 16 个产品,用户有 5000 个。 有什么方法我能找到
【问题讨论】: