I have this kind of Data Frame:
id type
1 a
1 b
2 b
2 a
3 c
3 b
(Each ID has only 2 rows for sure)
I'd like to count the number of each pair, when a pair is the two types per ID. I mean, to get that result for the previous table:
pair count
(a, b) 2
(b, c) 1
Thanks!