pandas.core.window.rolling.Rolling.sem¶
- Rolling.sem(ddof=1, *args, **kwargs)[source]¶
Compute rolling standard error of mean.
- Parameters
- ddofint, default 1
Delta Degrees of Freedom. The divisor used in calculations is
N - ddof, whereNrepresents the number of elements.- *args, **kwargs
For NumPy compatibility. No additional arguments are used.
- Returns
- Series or DataFrame
Returned object type is determined by the caller of the rolling calculation.
See also
pandas.Series.rollingCalling object with Series data.
pandas.DataFrame.rollingCalling object with DataFrames.
pandas.Series.semEquivalent method for Series.
pandas.DataFrame.semEquivalent method for DataFrame.
Notes
A minimum of one period is required for the rolling 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
>>> s.expanding().sem() 0 NaN 1 0.707107 2 0.707107 3 0.745356 dtype: float64