MulGroupBy.call#

MulGroupBy.call(func, *args, use_mul=False, set_primary=True, **kwargs)#

Call a function on the MulGroupBy object.

Similar to MulSeries.call and MulDataFrame.call, it applies a function to the MulSeries or MulDataFrame in each group and concateate the results into a final MulSeries or MulDataFrame.

Parameters:#

func: function

A function applied to the MulSeries or MulDataFrame in each group.

use_mul: bool, default False

An optional argument to determine how func is applied. If False, MulSeries.call(func) or MulDataFrame.call(func) is used to compute the results for each group. The object passed to func will be the MulSeries or the MulDataframe’s values Series or DataFrame in each group. If True, func(MulSeries) or func(MulDataFrame) are used to compute the results.

set_primarybool, default True

This parameter will only work if self.by is None or is a column label that selects a column in the parent’s index or columns dataframe. It sets the values in the by column as the primary index or columns of the return value.

Returns#

MulSeries or MulDataFrame

The return value is a MulSeries if the MulGroupBy object’s parent is a MulSeries. Otherwise, it is a MulDataFrame