parameters: (self)
return_statement: return dict(
              zip(group_names.to_pandas(), grouped_index._split(offsets[1:-1]))
          )
docstring: Returns a dictionary mapping group keys to row labels.
docstring_summary: Returns a dictionary mapping group keys to row labels.
docstring_tokens: Returns a dictionary mapping group keys to row labels .
function: def groups(self):
          """
          Returns a dictionary mapping group keys to row labels.
          """
          group_names, offsets, _, grouped_values = self._grouped()
          grouped_index = grouped_values.index
  
          if len(group_names) > self._MAX_GROUPS_BEFORE_WARN:
              warnings.warn(
                  f"GroupBy.groups() performance scales poorly with "
                  f"number of groups. Got {len(group_names)} groups."
              )
  
          return dict(
              zip(group_names.to_pandas(), grouped_index._split(offsets[1:-1]))
          )
function_tokens: def groups ( self ) : group_names , offsets , _ , grouped_values = self . _grouped ( ) grouped_index = grouped_values . index if len ( group_names ) > self . _MAX_GROUPS_BEFORE_WARN : warnings . warn ( f"GroupBy.groups() performance scales poorly with " f"number of groups. Got {len(group_names)} groups." ) return dict ( zip ( group_names . to_pandas ( ) , grouped_index . _split ( offsets [ 1 : - 1 ] ) ) )