pandas.core.window.rolling.Rolling.sem — pandas 2.2.3 documentation (original) (raw)
Rolling.sem(ddof=1, numeric_only=False)[source]#
Calculate the rolling standard error of mean.
Parameters:
ddofint, default 1
Delta Degrees of Freedom. The divisor used in calculations is N - ddof
, where N
represents the number of elements.
numeric_onlybool, default False
Include only float, int, boolean columns.
Added in version 1.5.0.
Returns:
Series or DataFrame
Return type is the same as the original object with np.float64
dtype.
Notes
A minimum of one period is required for the calculation.
Examples
s = pd.Series([0, 1, 2, 3]) s.rolling(2, min_periods=1).sem() 0 NaN 1 0.707107 2 0.707107 3 0.707107 dtype: float64