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.
- verbose name: Iterable
- default value: None
- port type: DataPort
- value type: object (can be None)
- data direction: IN
key¶
Grouping key function.
- verbose name: Key
- default value: None
- port type: GraphPort
- value type: Graph
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.
- verbose name: Key [Signature]
- default value: (item)
- port type: Port
- value type: object (can be None)
curitem¶
Current batch.
- verbose name: Curitem
- default value: None
- port type: DataPort
- value type: list (can be None)
- data direction: OUT
is_sorted¶
Whether the input iterable is already sorted by the grouping key.
- verbose name: Is Sorted
- default value: False
- port type: BoolPort
- value type: bool (can be None)
as_lists¶
Whether to emit the items as lists or as iterators.
- verbose name: As Lists
- default value: True
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)
verbose¶
Whether to print the current item to the console.
- verbose name: Verbose
- default value: False
- port type: BoolPort
- value type: bool (can be None)