from types_linq.lookup import Lookup
A lookup is a one-to-many dictionary. It maps keys to Enumerable sequences of values.
Users should not construct instances of this class directly. Use Enumerable.to_lookup()
instead.
Enumerable[Grouping[TKey_co, TValue_co]]
- Returns
int
Gets the number of key-collection pairs.
- Parameters
- value (
object
)
- value (
- Returns
bool
Tests whether key is in the lookup.
- Returns
int
Gets the number of key-collection pairs.
- Parameters
- key (
TKey_co
)
- key (
- Returns
Enumerable[TValue_co]
Gets the collection of values indexed by the specified key, or empty if no such key exists.
- Parameters
- result_selector (
Callable[[TKey_co, Enumerable[TValue_co]], TResult]
)
- result_selector (
- Returns
Enumerable[TResult]
Applies a transform function to each key and its associated values, then returns the results.
- Parameters
- value (
object
)
- value (
- Returns
bool
Tests whether key is in the lookup.