From 47f0bb4522203740b95182481644ddc4cc26a6eb Mon Sep 17 00:00:00 2001 From: KeiOshima Date: Thu, 25 Apr 2024 16:04:00 -0400 Subject: [PATCH] DOC: ficing RT03 errors for Index: drop_duplicates and memory_usage --- ci/code_checks.sh | 2 -- pandas/core/base.py | 1 + pandas/core/indexes/base.py | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index e2d125ad1fc68..71ea4c950f394 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -118,7 +118,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.drop_duplicates RT03" \ -i "pandas.Index.droplevel RT03,SA01" \ -i "pandas.Index.dropna RT03,SA01" \ -i "pandas.Index.duplicated RT03" \ @@ -133,7 +132,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.insert PR07,RT03,SA01" \ -i "pandas.Index.intersection PR07,RT03,SA01" \ -i "pandas.Index.join PR07,RT03,SA01" \ - -i "pandas.Index.memory_usage RT03" \ -i "pandas.Index.names GL08" \ -i "pandas.Index.nunique RT03" \ -i "pandas.Index.putmask PR01,RT03" \ diff --git a/pandas/core/base.py b/pandas/core/base.py index ab27248308d74..64910aa628713 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -1132,6 +1132,7 @@ def _memory_usage(self, deep: bool = False) -> int: Returns ------- bytes used + Returns memory usage of the values in the Index in bytes. See Also -------- diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index ffc228d57a95b..ace082fba609a 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2684,6 +2684,7 @@ def drop_duplicates(self, *, keep: DropKeep = "first") -> Self: Returns ------- Index + A new Index object with the duplicate values removed. See Also --------