iterators#
Replacements for parts of the toolz library.
Functions#
|
A toolz-style groupby implementation. |
|
A toolz inspired unique implementation. |
Attributes#
- T#
- groupby_to_dict(keyfunc: collections.abc.Callable[[T], K], iterable: collections.abc.Iterable[T]) dict[K, list[T]]#
A toolz-style groupby implementation.
Returns a dictionary of { key: [group] } instead of iterators.
- unique(iterable: collections.abc.Iterable[T]) collections.abc.Iterable[T]#
A toolz inspired unique implementation.
Returns a generator of unique elements in the sequence