bigframes.pandas.api.typing.SeriesGroupBy.std#
- SeriesGroupBy.std(*args, **kwargs) Series[source]#
Compute standard deviation of groups, excluding missing values.
For multiple groupings, the result index will be a MultiIndex.
Examples:
For SeriesGroupBy:
>>> lst = ['a', 'a', 'a', 'b', 'b', 'b'] >>> ser = bpd.Series([7, 2, 8, 4, 3, 3], index=lst) >>> ser.groupby(level=0).std() a 3.21455 b 0.57735 dtype: Float64
For DataFrameGroupBy:
>>> data = {'a': [1, 3, 5, 7, 7, 8, 3], 'b': [1, 4, 8, 4, 4, 2, 1]} >>> df = bpd.DataFrame(data, index=['dog', 'dog', 'dog', ... 'mouse', 'mouse', 'mouse', 'mouse']) >>> df.groupby(level=0).std() a b dog 2.0 3.511885 mouse 2.217356 1.5 [2 rows x 2 columns]
- Parameters:
numeric_only (bool, default False) – Include only float, int or boolean data.
- Returns:
Standard deviation of values within each group.
- Return type: