From 78a2ef2f43a40e13f51c223b64d2325bd9e7716e Mon Sep 17 00:00:00 2001 From: KeiOshima Date: Mon, 29 Apr 2024 20:27:15 -0400 Subject: [PATCH] DOC: ficing PR01 and SA01 issue for Index: Identical (#58442) * DOC: ficing PR01 and SA01 issue for Index: Identical * fixing EXpected to fail issue --- ci/code_checks.sh | 1 - pandas/core/indexes/base.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 45831f6030794..161047197ff6f 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -97,7 +97,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.get_indexer_for PR01,SA01" \ -i "pandas.Index.get_indexer_non_unique PR07,SA01" \ -i "pandas.Index.get_loc PR07,RT03,SA01" \ - -i "pandas.Index.identical PR01,SA01" \ -i "pandas.Index.join PR07,RT03,SA01" \ -i "pandas.Index.names GL08" \ -i "pandas.Index.putmask PR01,RT03" \ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 73ba02c515344..2bf0aca31449e 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -5344,12 +5344,23 @@ def identical(self, other) -> bool: """ Similar to equals, but checks that object attributes and types are also equal. + Parameters + ---------- + other : Index + The Index object you want to compare with the current Index object. + Returns ------- bool If two Index objects have equal elements and same type True, otherwise False. + See Also + -------- + Index.equals: Determine if two Index object are equal. + Index.has_duplicates: Check if the Index has duplicate values. + Index.is_unique: Return if the index has unique values. + Examples -------- >>> idx1 = pd.Index(["1", "2", "3"])