Skip to content

Commit f5c2242

Browse files
authored
DOC: DatetimeArray.std (#44020)
1 parent 2d2db8d commit f5c2242

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

doc/source/reference/indexing.rst

+1
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ Methods
407407
:toctree: api/
408408

409409
DatetimeIndex.mean
410+
DatetimeIndex.std
410411

411412
TimedeltaIndex
412413
--------------

pandas/core/arrays/datetimes.py

+20
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,26 @@ def std(
19231923
keepdims: bool = False,
19241924
skipna: bool = True,
19251925
):
1926+
"""
1927+
Return sample standard deviation over requested axis.
1928+
1929+
Normalized by N-1 by default. This can be changed using the ddof argument
1930+
1931+
Parameters
1932+
----------
1933+
axis : int optional, default None
1934+
Axis for the function to be applied on.
1935+
ddof : int, default 1
1936+
Degrees of Freedom. The divisor used in calculations is N - ddof,
1937+
where N represents the number of elements.
1938+
skipna : bool, default True
1939+
Exclude NA/null values. If an entire row/column is NA, the result will be
1940+
NA.
1941+
1942+
Returns
1943+
-------
1944+
Timedelta
1945+
"""
19261946
# Because std is translation-invariant, we can get self.std
19271947
# by calculating (self - Timestamp(0)).std, and we can do it
19281948
# without creating a copy by using a view on self._ndarray

0 commit comments

Comments
 (0)