pandas.core.groupby.GroupBy.var¶
- final GroupBy.var(ddof=1, engine=None, engine_kwargs=None)[source]¶
 Compute variance of groups, excluding missing values.
For multiple groupings, the result index will be a MultiIndex.
- Parameters
 - ddofint, default 1
 Degrees of freedom.
- enginestr, default None
 'cython': Runs the operation through C-extensions from cython.'numba': Runs the operation through JIT compiled code from numba.None: Defaults to'cython'or globally settingcompute.use_numba
New in version 1.4.0.
- engine_kwargsdict, default None
 For
'cython'engine, there are no acceptedengine_kwargsFor
'numba'engine, the engine can acceptnopython,nogilandparalleldictionary keys. The values must either beTrueorFalse. The defaultengine_kwargsfor the'numba'engine is{{'nopython': True, 'nogil': False, 'parallel': False}}
New in version 1.4.0.
- Returns
 - Series or DataFrame
 Variance of values within each group.
See also
Series.groupbyApply a function groupby to a Series.
DataFrame.groupbyApply a function groupby to each row or column of a DataFrame.