From 7c9d79151dac276913c7a2f462286fd053516ada Mon Sep 17 00:00:00 2001 From: Jonas Bergner Date: Sun, 25 Feb 2024 00:24:45 +0100 Subject: [PATCH 1/5] Add description of returned value of astype method --- pandas/core/generic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 9424e421fd85f..64a6e4360e3c1 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6197,6 +6197,7 @@ def astype( Returns ------- same type as caller + The pandas object casted to the specified ``dtype``. See Also -------- From 3d9d8c94d65df1356850f2c56fadeb55b24b905a Mon Sep 17 00:00:00 2001 From: Jonas Bergner Date: Sun, 25 Feb 2024 00:30:04 +0100 Subject: [PATCH 2/5] Add description text to return value of at_time method. --- pandas/core/generic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 64a6e4360e3c1..f1af779e00232 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -8676,6 +8676,7 @@ def at_time(self, time, asof: bool = False, axis: Axis | None = None) -> Self: Returns ------- Series or DataFrame + The values with the specified time. Raises ------ From fad93b8947a15f755b72f72561a99bd0b6423fdf Mon Sep 17 00:00:00 2001 From: Jonas Bergner Date: Sun, 25 Feb 2024 00:44:37 +0100 Subject: [PATCH 3/5] Add description for rreturn value of DataFrame.ewm method --- pandas/core/window/ewm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index 9b21a23b1aefe..f7f80f9de74fe 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -226,6 +226,7 @@ class ExponentialMovingWindow(BaseWindow): Returns ------- pandas.api.typing.ExponentialMovingWindow + An instance of ExponentialMovingWindow for further exponentially weighted (EW) calculations, e.g. using the ``mean`` method. See Also -------- From bb1f8049e8dc25c6a5ef876bf960d30c3da9ac2a Mon Sep 17 00:00:00 2001 From: Jonas Bergner Date: Sun, 25 Feb 2024 00:49:19 +0100 Subject: [PATCH 4/5] Remove fixed methods from validation script exclusion --- ci/code_checks.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 47a2cf93a4f89..e60e6cec9d89a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -1882,10 +1882,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Partially validate docstrings (RT03)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=RT03 --ignore_functions \ - pandas.CategoricalIndex.set_categories\ - pandas.DataFrame.astype\ - pandas.DataFrame.at_time\ - pandas.DataFrame.ewm\ pandas.DataFrame.expanding\ pandas.DataFrame.filter\ pandas.DataFrame.first_valid_index\ From 29426199f747005a70bfd3d48463934fa90c4f8f Mon Sep 17 00:00:00 2001 From: Jonas Bergner Date: Sun, 25 Feb 2024 01:01:30 +0100 Subject: [PATCH 5/5] Change indentation in description --- pandas/core/window/ewm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/window/ewm.py b/pandas/core/window/ewm.py index f7f80f9de74fe..b2855ff1f4048 100644 --- a/pandas/core/window/ewm.py +++ b/pandas/core/window/ewm.py @@ -226,7 +226,8 @@ class ExponentialMovingWindow(BaseWindow): Returns ------- pandas.api.typing.ExponentialMovingWindow - An instance of ExponentialMovingWindow for further exponentially weighted (EW) calculations, e.g. using the ``mean`` method. + An instance of ExponentialMovingWindow for further exponentially weighted (EW) + calculations, e.g. using the ``mean`` method. See Also --------