From 9490eb56db54c23f298a21e80bb83c31c9598518 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Fri, 26 Apr 2024 09:36:03 +0530 Subject: [PATCH 1/2] DOC: add PR01,RT03 for pandas.DatetimeIndex.std --- pandas/core/arrays/datetimes.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 106064ade8344..0f59d62339bf2 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -2248,9 +2248,25 @@ 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``. @@ -2258,6 +2274,7 @@ def std( Returns ------- Timedelta + Standard deviation over requested axis. See Also -------- From eab3fd77d0b69089ea2cc84596e01cba1858f1ab Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Fri, 26 Apr 2024 09:38:25 +0530 Subject: [PATCH 2/2] DOC: remove PR01,RT03 for pandas.DatetimeIndex.std --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 9aae477ca1af3..04e66d9bf3603 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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.DatetimeTZDtype SA01" \