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
funcis applied. If False,MulSeries.call(func)orMulDataFrame.call(func)is used to compute the results for each group. The object passed tofuncwill be the MulSeries or the MulDataframe’s values Series or DataFrame in each group. If True,func(MulSeries)orfunc(MulDataFrame)are used to compute the results.- set_primarybool, default True
This parameter will only work if
self.byisNoneor is a column label that selects a column in the parent’s index or columns dataframe. It sets the values in thebycolumn 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
MulDataFrame