pandas.api.typing.SeriesGroupBy.var
pandas 3.1.1 · GroupBy · method
Estimate variance, the spread around the mean. ddof controls the divisor.
Call syntax
pd.api.typing.SeriesGroupBy.var(
ddof=1,
engine=None,
engine_kwargs=None,
numeric_only=False,
skipna=True,
)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
ddof |
Optional Positional or keyword Default 1 |
int Set the degrees of freedom correction. The usual variance divisor is N minus ddof. |
engine |
Optional Positional or keyword Default None |
str Choose the implementation that performs the operation. |
engine_kwargs |
Optional Positional or keyword Default None |
dict Pass a dictionary of options to the selected engine. |
numeric_only |
Optional Positional or keyword Default False |
bool Restrict the calculation to columns pandas considers numeric where applicable. |
skipna |
Optional Positional or keyword Default True |
bool Choose whether to exclude missing values during the calculation. |
Returns
Series or DataFrame