Group by and cube over the column(s)
by (Optional[Union[str, Series, List[Union[str, Series]]]]) – the series to group by and cube. Can be a column or index name str, a Series or a list
of any of those. If Series are passed, they should have the same base node as the DataFrame.
a new DataFrame object with the
group_by attribute set.