modin.pandas.SeriesGroupBy.var¶
- SeriesGroupBy.var(ddof=1, engine=None, engine_kwargs=None, numeric_only=False)[source]¶
Compute variance of groups, excluding missing values.
For multiple groupings, the result index will be a MultiIndex.
- Parameters:
ddof (int, default 1) – Degrees of freedom. When ddof is 0/1, the operation is executed with Snowflake. Otherwise, it is not yet supported.
engine (str, default None) –
In pandas, engine can be configured as
'cython'or'numba', andNonedefaults to'cython'or globally settingcompute.use_numba.This parameter is ignored in Snowpark pandas, as the execution is always performed in Snowflake.
engine_kwargs (dict, default None) –
Configuration keywords for the configured execution egine.
This parameter is ignored in Snowpark pandas, as the execution is always performed in Snowflake.
numeric_only (bool, default False) – Include only float, int or boolean data columns.
- Returns:
Variance of values within each group.
- Return type:
Examples
For SeriesGroupBy:
Note that if the number of elements in a group is less or equal to the ddof, the result for the group will be NaN/None. For example, the value for group c is NaN when we call ser.groupby(level=0).var(), and the default ddof is 1.
For DataFrameGroupBy: