Lines Matching refs:groupby
207 … noruns = [k for k,v in groupby(c)] # combo without consecutive repeats
453 self.assertEqual([], list(groupby([])))
454 self.assertEqual([], list(groupby([], key=id)))
455 self.assertRaises(TypeError, list, groupby('abc', []))
456 self.assertRaises(TypeError, groupby, None)
457 self.assertRaises(TypeError, groupby, 'abc', lambda x:x, 10)
463 for k, g in groupby(s, lambda r:r[0]):
471 for k, g in groupby(s, lambda r:r[0]):
472 for ik, ig in groupby(g, lambda r:r[2]):
480 keys = [k for k, g in groupby(s, lambda r:r[0])]
488 r = [k for k, g in groupby(sorted(s))]
491 r = [k for k, g in groupby(sorted(s)) if list(islice(g,1,2))]
494 r = [(len(list(g)), k) for k, g in groupby(sorted(s))]
497 r = sorted([(len(list(g)) , k) for k, g in groupby(sorted(s))], reverse=True)[:3]
508 return [func(g) for k, g in groupby(iterable, keyp)]
990 for f in (chain, cycle, izip, groupby):
1041 self.assertEqual([k for k, g in groupby('AAAABBBCCDAABBB')],
1043 self.assertEqual([(list(g)) for k, g in groupby('AAAABBBCCD')],
1176 self.makecycle(groupby([a]*2, lambda x:x), a)
1182 for i, j in groupby(xrange(n), key=keyfunc):
1348 self.assertEqual([k for k, sb in groupby(g(s))], list(g(s)))
1349 self.assertRaises(TypeError, groupby, X(s))
1350 self.assertRaises(TypeError, list, groupby(N(s)))
1351 self.assertRaises(ZeroDivisionError, list, groupby(E(s)))
1528 for (k, b) in groupby(range(10), f):
1543 g = next(groupby(range(10), K))[1]