pandas.DataFrame.groupby — pandas 1.3.5 documentation
https://pandas.pydata.org/.../reference/api/pandas.DataFrame.groupby.htmlpandas.DataFrame.groupby¶ DataFrame. groupby (by = None, axis = 0, level = None, as_index = True, sort = True, group_keys = True, squeeze = NoDefault.no_default, observed = False, dropna = True) [source] ¶ Group DataFrame using a mapper or by a Series of columns. A groupby operation involves some combination of splitting the object, applying a function, and combining the results.