From 79c5d3c4d51ab793cd70fbfe535a988f55d3d8f8 Mon Sep 17 00:00:00 2001 From: Derek Sharp Date: Tue, 5 Apr 2022 23:06:38 -0400 Subject: [PATCH 1/4] DOC: fix SA04 errors flagged by validate_docstrings.py and add SA04 to code_checks.sh --- ci/code_checks.sh | 4 ++-- pandas/core/indexes/base.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index ec8545ad1ee4a..c6d9698882f4d 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -78,8 +78,8 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT04, RT05, SA02, SA03, SS01, SS02, SS03, SS04, SS05)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT04,RT05,SA02,SA03,SS01,SS02,SS03,SS04,SS05 + MSG='Validate docstrings (EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05)' ; echo $MSG + $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05 RET=$(($RET + $?)) ; echo $MSG "DONE" fi diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 2ded3c4926f6b..8e1ef1a7ef096 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -4371,8 +4371,8 @@ def reindex( See Also -------- - Series.reindex - DataFrame.reindex + Series.reindex : Return only specified index labels of Series. + DataFrame.reindex : Change to new indices or expand indices. Examples -------- From db0a1e9a481b9a7a335979ecaae0ac003c1b634c Mon Sep 17 00:00:00 2001 From: Derek Sharp Date: Thu, 7 Apr 2022 17:29:40 -0400 Subject: [PATCH 2/4] DOC: apply feedback --- pandas/core/indexes/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 8e1ef1a7ef096..2e82d3b55c4a1 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -4371,8 +4371,9 @@ def reindex( See Also -------- - Series.reindex : Return only specified index labels of Series. - DataFrame.reindex : Change to new indices or expand indices. + Series.reindex : Conform Series to new index with optional filling logic. + DataFrame.reindex : Conform Series/DataFrame to new index with optional filling + logic. Examples -------- From 8c9da8399cdb133cfc76f9185d49e4eacdbd62e9 Mon Sep 17 00:00:00 2001 From: Derek Sharp Date: Fri, 8 Apr 2022 17:28:32 -0400 Subject: [PATCH 3/4] DOC: change Series/Dataframe to just Dataframe --- pandas/core/indexes/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 2e82d3b55c4a1..07f87bc5942f7 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -4372,7 +4372,7 @@ def reindex( See Also -------- Series.reindex : Conform Series to new index with optional filling logic. - DataFrame.reindex : Conform Series/DataFrame to new index with optional filling + DataFrame.reindex : Conform DataFrame to new index with optional filling logic. Examples From 5cf439f3d10384e1efbad53491dfdde231288bc0 Mon Sep 17 00:00:00 2001 From: Derek Sharp Date: Fri, 8 Apr 2022 17:29:57 -0400 Subject: [PATCH 4/4] DOC: move to one line --- pandas/core/indexes/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 07f87bc5942f7..80527474f2be6 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -4372,8 +4372,7 @@ def reindex( See Also -------- Series.reindex : Conform Series to new index with optional filling logic. - DataFrame.reindex : Conform DataFrame to new index with optional filling - logic. + DataFrame.reindex : Conform DataFrame to new index with optional filling logic. Examples --------