DatetimeIndex.std(axis=None, dtype=None, out=None, ddof=1, keepdims=False, skipna=True)[source]#

Return sample standard deviation over requested axis.

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

axisint, optional

Axis for the function to be applied on. For pandas.Series this parameter is unused and defaults to None.

dtypedtype, optional, default None

Type to use in computing the standard deviation. For arrays of integer type the default is float64, for arrays of float types it is the same as the array type.

outndarray, optional, default None

Alternative output array in which to place the result. It must have the same shape as the expected output but the type (of the calculated values) will be cast if necessary.

ddofint, default 1

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

keepdimsbool, optional

If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the std method of sub-classes of ndarray, however any non-default value will be. If the sub-class method does not implement keepdims any exceptions will be raised.

skipnabool, default True

Exclude NA/null values. If an entire row/column is NA, the result will be NA.


Standard deviation over requested axis.

See also


Returns the standard deviation of the array elements along given axis.


Return sample standard deviation over requested axis.


For pandas.DatetimeIndex:

>>> idx = pd.date_range("2001-01-01 00:00", periods=3)
>>> idx
DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.std()
Timedelta('1 days 00:00:00')