Quantcast
Viewing all articles
Browse latest Browse all 11

Most Frequent Pairs

Hi does anybody know how to get the most frequent pairs out of a list?. It is said that I cannot used the itertools.combinations,m so I have no idea because I’m so used to it.Also, the pair can’t be the same thing like [‘milk’,’milk’]. The output must be like this: >>> print(mostFrequentPairs([['milk','eggs'],['milk','milk','tofu', 'eggs' ['eggs']])) [['eggs', […]

The post Most Frequent Pairs appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 11

Trending Articles