Lines Matching refs:groupby
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. It
379 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 B
394 # [list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D
721 g = groupby(iterable)
813 return map(next, map(itemgetter(1), groupby(iterable, key)))