pandas.Index.groupby

Index.groupby(self, values)[source]

Group the index labels by a given array of values.

Parameters
valuesarray

Values used to determine the groups.

Returns
groupsdict

{group name -> group labels}

Scroll To Top