pandas.api.typing.SeriesGroupBy.sem

pandas 3.1.1 · GroupBy · method

Calculate the standard error of the mean for the selected data.

Call syntax

pd.api.typing.SeriesGroupBy.sem(ddof=1, numeric_only=False, skipna=True)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted 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.

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