From 7bca28b110d5d3962e2d52abb548fef1f33964d0 Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Thu, 25 Apr 2024 16:51:59 -0400 Subject: [PATCH 1/2] Fix RT03 and SA01 errors for Index.droplevel, Index.dropna --- ci/code_checks.sh | 2 -- pandas/core/indexes/base.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 9aae477ca1af3..22f81685334ff 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -110,8 +110,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.copy PR07,SA01" \ -i "pandas.Index.difference PR07,RT03,SA01" \ -i "pandas.Index.drop PR07,SA01" \ - -i "pandas.Index.droplevel RT03,SA01" \ - -i "pandas.Index.dropna RT03,SA01" \ -i "pandas.Index.duplicated RT03" \ -i "pandas.Index.get_indexer PR07,SA01" \ -i "pandas.Index.get_indexer_for PR01,SA01" \ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index ace082fba609a..0a447243e7c3c 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2093,6 +2093,12 @@ def droplevel(self, level: IndexLabel = 0): Returns ------- Index or MultiIndex + Returns an Index or MultiIndex object, depending on the resulting index + after removing the requested level(s). + + See Also + -------- + Index.dropna : Return Index without NA/NaN values. Examples -------- @@ -2615,6 +2621,12 @@ def dropna(self, how: AnyAll = "any") -> Self: Returns ------- Index + Returns an Index object after removing NA/NaN values. + + See Also + -------- + Index.fillna : Fill NA/NaN values with the specified value. + Index.isna : Detect missing values. Examples -------- From f34dc1b1b439ec05d6a167cd31ad21110c2893a3 Mon Sep 17 00:00:00 2001 From: shriyakalakata Date: Thu, 25 Apr 2024 17:13:28 -0400 Subject: [PATCH 2/2] Remove line from code_checks.sh --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 22f81685334ff..586021e857510 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -159,7 +159,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.MultiIndex.append PR07,SA01" \ -i "pandas.MultiIndex.copy PR07,RT03,SA01" \ -i "pandas.MultiIndex.drop PR07,RT03,SA01" \ - -i "pandas.MultiIndex.droplevel RT03,SA01" \ -i "pandas.MultiIndex.dtypes SA01" \ -i "pandas.MultiIndex.get_indexer PR07,SA01" \ -i "pandas.MultiIndex.get_level_values SA01" \