Compute standard deviation of groups, excluding missing values. For multiple groupings, the result index will be a MultiIndex. Parameters ---------- ddof : int, default 1 Delta Degrees of Freedom. The divisor used in calculations is ``N - ddof``
(
self,
ddof: int = 1,
engine: Literal["cython", "numba"] | None = None,
engine_kwargs: dict[str, bool] | None = None,
numeric_only: bool = False,
skipna: bool = True,
)
| 2394 | |
| 2395 | @final |
| 2396 | def std( |
| 2397 | self, |
| 2398 | ddof: int = 1, |
| 2399 | engine: Literal["cython", "numba"] | None = None, |
| 2400 | engine_kwargs: dict[str, bool] | None = None, |
| 2401 | numeric_only: bool = False, |
| 2402 | skipna: bool = True, |
| 2403 | ): |
| 2404 | """ |
| 2405 | Compute standard deviation of groups, excluding missing values. |
| 2406 | |
| 2407 | For multiple groupings, the result index will be a MultiIndex. |
| 2408 | |
| 2409 | Parameters |
| 2410 | ---------- |
| 2411 | ddof : int, default 1 |
| 2412 | Delta Degrees of Freedom. The divisor used in calculations is ``N - ddof``, |
| 2413 | where ``N`` represents the number of elements. |
| 2414 | |
| 2415 | engine : str, default None |
| 2416 | * ``'cython'`` : Runs the operation through C-extensions from cython. |
| 2417 | * ``'numba'`` : Runs the operation through JIT compiled code from numba. |
| 2418 | * ``None`` : Defaults to ``'cython'`` or globally setting |
| 2419 | ``compute.use_numba`` |
| 2420 | |
| 2421 | engine_kwargs : dict, default None |
| 2422 | * For ``'cython'`` engine, there are no accepted ``engine_kwargs`` |
| 2423 | * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil`` |
| 2424 | and ``parallel`` dictionary keys. The values must either be ``True`` or |
| 2425 | ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is |
| 2426 | ``{'nopython': True, 'nogil': False, 'parallel': False}`` |
| 2427 | |
| 2428 | numeric_only : bool, default False |
| 2429 | Include only `float`, `int` or `boolean` data. |
| 2430 | |
| 2431 | .. versionchanged:: 2.0.0 |
| 2432 | |
| 2433 | numeric_only now defaults to ``False``. |
| 2434 | |
| 2435 | skipna : bool, default True |
| 2436 | Exclude NA/null values. If an entire group is NA, the result will be NA. |
| 2437 | |
| 2438 | .. versionadded:: 3.0.0 |
| 2439 | |
| 2440 | Returns |
| 2441 | ------- |
| 2442 | Series or DataFrame |
| 2443 | Standard deviation of values within each group. |
| 2444 | |
| 2445 | See Also |
| 2446 | -------- |
| 2447 | Series.std : Apply function std to a Series. |
| 2448 | DataFrame.std : Apply function std to each row or column of a DataFrame. |
| 2449 | |
| 2450 | Examples |
| 2451 | -------- |
| 2452 | For SeriesGroupBy: |
| 2453 |
nothing calls this directly
no test coverage detected