pandas.core.resample.Resampler.std #
- 最终 重采样器。std ( ddof = 1 , numeric_only = False , * args , ** kwargs ) [来源] #
计算组的标准差,排除缺失值。
- 参数:
- ddof int,默认1
自由程度。
- numeric_only布尔值,默认 False
仅包含float、int或boolean数据。
1.5.0 版本中的新增内容。
在版本 2.0.0 中更改: numeric_only 现在默认为
False
.
- 返回:
- 数据框或系列
每组内值的标准差。
例子
>>> ser = pd.Series([1, 3, 2, 4, 3, 8], ... index=pd.DatetimeIndex(['2023-01-01', ... '2023-01-10', ... '2023-01-15', ... '2023-02-01', ... '2023-02-10', ... '2023-02-15'])) >>> ser.resample('MS').std() 2023-01-01 1.000000 2023-02-01 2.645751 Freq: MS, dtype: float64