Searched refs:groupby (Results 1 – 25 of 35) sorted by relevance
12
207 … noruns = [k for k,v in groupby(c)] # combo without consecutive repeats453 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])][all …]
354 … noruns = [k for k,v in groupby(c)] # combo without consecutive repeats701 self.assertEqual([], list(groupby([])))702 self.assertEqual([], list(groupby([], key=id)))703 self.assertRaises(TypeError, list, groupby('abc', []))704 self.assertRaises(TypeError, groupby, None)705 self.assertRaises(TypeError, groupby, 'abc', lambda x:x, 10)711 for k, g in groupby(s, lambda r:r[0]):720 for k, g in pickle.loads(pickle.dumps(groupby(s, testR), proto)):728 for k, g in groupby(s, testR):729 for ik, ig in groupby(g, testR2):[all …]
51 .groupby([](const item& i) { return i.args; }); in run()62 .groupby([](const item& i) { return i.concurrency; }); in run()
26 {%- for _, values in enum.fields|groupby('numeric_value') %}63 {%- for enum_field in enum.fields|groupby('numeric_value') %}
9 from itertools import groupby202 for name, res_iter in groupby(results_by_name, key=name_key):
50 print_entries(next(g[1]) for g in itertools.groupby(sorted(entries, key=lambda e: e[1]), key=lambda…
54 :func:`groupby` iterable[, keyfunc] sub-iterators grouped by value of keyfunc(v)290 .. function:: groupby(iterable[, key])298 The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. It305 with :func:`groupby`. Because the source is shared, when the :func:`groupby`312 for k, g in groupby(data, keyfunc):316 :func:`groupby` is roughly equivalent to::318 class groupby(object):319 # [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B320 # [list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D712 g = groupby(iterable)[all …]
28 :func:`itertools.groupby`). This function is primarily used as a transition
56 :func:`groupby` iterable[, key] sub-iterators grouped by value of k…364 .. function:: groupby(iterable, key=None)372 The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. It379 with :func:`groupby`. Because the source is shared, when the :func:`groupby`386 for k, g in groupby(data, keyfunc):390 :func:`groupby` is roughly equivalent to::392 class groupby:393 # [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B394 # [list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D721 g = groupby(iterable)[all …]
17 {%- for enum_field in enum.fields|groupby('numeric_value') %}
23 {%- for enum_field in enum.fields|groupby('numeric_value') %}
91 from itertools import groupby145 for typ, values in groupby(data, type):
73 for key, values in filters.groupby(sorted(
16 from itertools import groupby, chain852 in groupby(sorted(value, key=expr), expr)]
418 Stop crashes when concurrently iterate over itertools.groupby() iterators.427 An iterator produced by itertools.groupby() iterator now becomes exhausted428 after advancing the groupby iterator.
1093 * The :mod:`itertools` module gained a ``groupby(iterable[, *func*])``1097 itself. :func:`groupby` then groups the elements into subsequences which have1102 whether a number is even or odd, so the result of :func:`groupby` is to return1107 >>> for key_val, it in itertools.groupby(L, lambda x: x % 2):1117 :func:`groupby` is typically used with sorted input. The logic for1118 :func:`groupby` is similar to the Unix ``uniq`` filter which makes it handy for1125 >>> for k, g in itertools.groupby(letters):1134 >>> [k for k, g in groupby(letters)]1137 >>> [(k, len(list(g))) for k, g in groupby(letters)]
234 linq_driver< linq_groupby<Collection, KeyFn> > groupby(KeyFn fn) in groupby() function in cpplinq::linq_driver
388 args = itertools.groupby(args, lambda x: x in ["-n", "--next"])
161 for key, group in itertools.groupby(attribute_list, iter_keyfunc):
242 .groupby([](int i){return i % 10; }); in TEST()
347 return groupby (f, key=identifier)
949 The last function I'll discuss, :func:`itertools.groupby(iter, key_func=None)950 <itertools.groupby>`, is the most complicated. ``key_func(elem)`` is a function954 :func:`~itertools.groupby` collects all the consecutive elements from the969 itertools.groupby(city_list, get_state) =>982 :func:`~itertools.groupby` assumes that the underlying iterable's contents will
958 for initial, group in itertools.groupby ((lt_tags for lt_tags in [
1028 The last function I'll discuss, ``itertools.groupby(iter, key_func=None)``, is1033 ``groupby()`` collects all the consecutive elements from the underlying iterable1048 itertools.groupby(city_list, get_state) =>1061 ``groupby()`` assumes that the underlying iterable's contents will already be