GroupwiseIterator¶
An iterator that emits lists of items grouped according to an optional grouping key.
The iterator emits 2-element lists of a key and a list (or iterable) of items that share that key. Note that if your input is already sorted by the key, you can set the is_sorted option to improve performance. Version 1.0.0
Ports/Properties¶
iterable¶
Data to iterate over.
key¶
Grouping key function.
key__signature¶
This names the argument of an optional "key" graph that can be wired into the node. The graph's job is to reduce an item from the wired-in iterable to a key that can be used to group the items. If no key is wired in, the items will be grouped according to their own identity. This graph should only involve stateless nodes.
curitem¶
Current batch.
is_sorted¶
Whether the input iterable is already sorted by the grouping key.
as_lists¶
Whether to emit the items as lists or as iterators.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
verbose¶
Whether to print the current item to the console.