Skip to content

Commit 61731a7

Browse files
tuhinsharma121pmhatre1
authored andcommitted
DOC: Enforce Numpy Docstring Validation for pandas.DatetimeIndex.std (pandas-dev#58439)
* DOC: add PR01,RT03 for pandas.DatetimeIndex.std * DOC: remove PR01,RT03 for pandas.DatetimeIndex.std
1 parent 0fdcb6e commit 61731a7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
100100
-i "pandas.DataFrame.var PR01,RT03,SA01" \
101101
-i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \
102102
-i "pandas.DatetimeIndex.snap PR01,RT03" \
103-
-i "pandas.DatetimeIndex.std PR01,RT03" \
104103
-i "pandas.DatetimeIndex.to_period RT03" \
105104
-i "pandas.DatetimeIndex.to_pydatetime RT03,SA01" \
106105
-i "pandas.Grouper PR02" \

pandas/core/arrays/datetimes.py

+17
Original file line numberDiff line numberDiff line change
@@ -2248,16 +2248,33 @@ def std(
22482248
axis : int, optional
22492249
Axis for the function to be applied on. For :class:`pandas.Series`
22502250
this parameter is unused and defaults to ``None``.
2251+
dtype : dtype, optional, default None
2252+
Type to use in computing the standard deviation. For arrays of
2253+
integer type the default is float64, for arrays of float types
2254+
it is the same as the array type.
2255+
out : ndarray, optional, default None
2256+
Alternative output array in which to place the result. It must have
2257+
the same shape as the expected output but the type (of the
2258+
calculated values) will be cast if necessary.
22512259
ddof : int, default 1
22522260
Degrees of Freedom. The divisor used in calculations is `N - ddof`,
22532261
where `N` represents the number of elements.
2262+
keepdims : bool, optional
2263+
If this is set to True, the axes which are reduced are left in the
2264+
result as dimensions with size one. With this option, the result
2265+
will broadcast correctly against the input array. If the default
2266+
value is passed, then keepdims will not be passed through to the
2267+
std method of sub-classes of ndarray, however any non-default value
2268+
will be. If the sub-class method does not implement keepdims any
2269+
exceptions will be raised.
22542270
skipna : bool, default True
22552271
Exclude NA/null values. If an entire row/column is ``NA``, the result
22562272
will be ``NA``.
22572273
22582274
Returns
22592275
-------
22602276
Timedelta
2277+
Standard deviation over requested axis.
22612278
22622279
See Also
22632280
--------

0 commit comments

Comments
 (0)