Skip to content

Commit

Permalink
DOC: Enforce Numpy Docstring Validation for pandas.DatetimeIndex.std (p…
Browse files Browse the repository at this point in the history
…andas-dev#58439)

* DOC: add PR01,RT03 for pandas.DatetimeIndex.std

* DOC: remove PR01,RT03 for pandas.DatetimeIndex.std
  • Loading branch information
tuhinsharma121 authored and pmhatre1 committed May 7, 2024
1 parent 0fdcb6e commit 61731a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.DataFrame.var PR01,RT03,SA01" \
-i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \
-i "pandas.DatetimeIndex.snap PR01,RT03" \
-i "pandas.DatetimeIndex.std PR01,RT03" \
-i "pandas.DatetimeIndex.to_period RT03" \
-i "pandas.DatetimeIndex.to_pydatetime RT03,SA01" \
-i "pandas.Grouper PR02" \
Expand Down
17 changes: 17 additions & 0 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2248,16 +2248,33 @@ def std(
axis : int, optional
Axis for the function to be applied on. For :class:`pandas.Series`
this parameter is unused and defaults to ``None``.
dtype : dtype, 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.
out : ndarray, 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.
ddof : int, default 1
Degrees of Freedom. The divisor used in calculations is `N - ddof`,
where `N` represents the number of elements.
keepdims : bool, 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.
skipna : bool, default True
Exclude NA/null values. If an entire row/column is ``NA``, the result
will be ``NA``.
Returns
-------
Timedelta
Standard deviation over requested axis.
See Also
--------
Expand Down

0 comments on commit 61731a7

Please sign in to comment.