modin.pandas.DataFrameGroupBy.indices¶
- property DataFrameGroupBy.indices: dict[collections.abc.Hashable, numpy.ndarray[Any, numpy.dtype[numpy.int64]]][source]¶
Get a dictionary mapping group key to row positions.
- Returns:
Dict {group name -> group positions}.
- Return type:
Dict[Any, np.array]
Examples
Groupby one column and get the positions of each member of each group.
Group the same dataframe with a different index. The result is the same because the row positions for each group are the same.
Notes
Beware that the return value is a python dictionary, so evaluating this property will trigger evaluation of the pandas dataframe and will materialize data that could be as large as the size of the grouping columns.