pandas.core.window.rolling.Rolling.sem#
- Rolling.sem(ddof=1, numeric_only=False)[源代码]#
计算滚动均值的标准误差。
- Parameters:
- ddofint, 默认值 1
自由度增量。计算中使用的除数是
N - ddof,其中N表示元素数量。- numeric_onlybool,默认 False
仅包括浮点数、整数、布尔列。
在 1.5.0 版本加入.
- Returns:
- Series 或 DataFrame
返回类型与原始对象相同,并具有
np.float64数据类型。
参见
pandas.Series.rolling使用 Series 数据调用滚动。
pandas.DataFrame.rolling使用 DataFrame 调用滚动。
pandas.Series.semSeries 的聚合均方误差。
pandas.DataFrame.semDataFrame 的聚合均方误差。
Notes
计算需要至少一个周期。
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