4.7.7.1.2.3.1.1. statsmodels.tools.grouputils.Grouping.__init__¶
-
Grouping.
__init__
(index, names=None)[source]¶ - index : index-like
- Can be pandas MultiIndex or Index or array-like. If array-like and is a MultipleIndex (more than one grouping variable), groups are expected to be in each row. E.g., [(‘red’, 1), (‘red’, 2), (‘green’, 1), (‘green’, 2)]
- names : list or str, optional
- The names to use for the groups. Should be a str if only one grouping variable is used.
Notes
If index is already a pandas Index then there is no copy.