grouped.grouped_mean
- grouped.grouped_mean(ind: Array, v: Array, filtered: bool = True, chunks: int | tuple[int, ...] | None = None, std_df: Literal[0, 1] = 1, error: Literal['bootstrap', 'parametric'] | None = None, bootstrap_config: BootstrapConfig | None = None, verbose: bool = False) MeanResult | DataFrame
Compute the mean of each index.
- Parameters:
- indarray-like
index labels
- varray-like
data
- filteredbool, optional
Filter the output in a pandas dataframe, which is the default. If False, this function returns the raw output, where the index of the value corresponds to the index labels.
- chunksint or tuple of ints, optional
Optional chunking of the data, which can be run in parallel in a joblib context
- std_df{0, 1}, optional
Degrees of freedom for the standard deviation if error is ‘parametric’
- error{‘bootstrap’, ‘parametric’}, optional
Compute the uncertainty of the mean using either a bootstrap or parametric method. If not set, the function only returns the mean. With bootstrap, the standard error is returned, and with parametric, the standard error and standard deviation are returned
- bootstrap_configBootstrapConfig, optional
Configuration for the bootstrap if error is ‘bootstrap’
- verbosebool, optional
Print timing
- :returns: The mean of each index. If filtered is True, this function returns a pandas DataFrame otherwise it returns a
MeanStatResult object.
- :rtype: MeanStatResult or pd.DataFrame