Skip to main content
`Ctrl`+`K`

# pandas.Series.std

Series.std(*, axis=None, skipna=True, ddof=1, numeric_only=False, **kwargs)

  Return sample standard deviation.

  Normalized by N-1 by default. This can be changed using the ddof argument.

  Parameters:
    axis{index (0)}

      This parameter is unused and defaults to 0.

    skipna bool, default True

      Exclude NA/null values. If Series is NA, the result will be NA.

    ddof int, default 1

      Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.

    numeric_only bool, default False

      Not implemented for Series.

    **kwargs

      Additional keywords have no effect but might be accepted for compatibility with NumPy. See NumPy compatibility kwargs for more.

  Returns:
    scalar

      Standard deviation over all values in the Series.

  See also

  `numpy.std`

    Compute the standard deviation along the specified axis.

  `Series.var`

    Return unbiased variance over requested axis.

  `Series.sem`

    Return unbiased standard error of the mean over requested axis.

  `Series.mean`

    Return the mean of the values over the requested axis.

  `Series.median`

    Return the median of the values over the requested axis.

  `Series.mode`

    Return the mode(s) of the Series.

  Notes

  To have the same behaviour as `numpy.std`, use `ddof=0` (instead of the default `ddof=1`) and `skipna=False`.

  Examples

      >>> s = pd.Series([1, 2, 3])
      >>> s.std()
      1.0

  Alternatively, `ddof=0` can be set to normalize by $N$ instead of $N-1$:

      >>> s.std(ddof=0)
      0.816496580927726