如何检索唯一群组及其数量?

时间:2017-11-27 10:09:21

标签: python pandas dataframe unique

我在下面有一个csv。

UID CID
u-1 c-1
u-1 c-2
u-1 c-3
u-2 c-2
u-2 c-1
u-2 c-3
u-3 c-3
u-3 c-2
u-3 c-2

我想要独特的小组计数。

ex) c-1, c-2, c-3 is one
    c-2, c-1, c-3 is two
    c-3, 3-2, c-1 is three
    c-1, c-2, c-3 is already group
thus, unique group count is 3.

CID很多。 of couse,UID ..

0 个答案:

没有答案