diff --git a/ci/code_checks.sh b/ci/code_checks.sh index d1cdff8f7f56b..4ee654e09294d 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -150,10 +150,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.drop_duplicates RT03" \ -i "pandas.Index.droplevel RT03,SA01" \ -i "pandas.Index.dropna RT03,SA01" \ - -i "pandas.Index.dtype SA01" \ -i "pandas.Index.duplicated RT03" \ -i "pandas.Index.empty GL08" \ - -i "pandas.Index.equals SA01" \ -i "pandas.Index.fillna RT03" \ -i "pandas.Index.get_indexer PR07,SA01" \ -i "pandas.Index.get_indexer_for PR01,SA01" \ @@ -169,7 +167,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index.join PR07,RT03,SA01" \ -i "pandas.Index.map SA01" \ -i "pandas.Index.memory_usage RT03" \ - -i "pandas.Index.name SA01" \ -i "pandas.Index.names GL08" \ -i "pandas.Index.nbytes SA01" \ -i "pandas.Index.nunique RT03" \ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 8ede401f37184..5b8ba20c14f74 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -976,6 +976,10 @@ def dtype(self) -> DtypeObj: """ Return the dtype object of the underlying data. + See Also + -------- + Index.inferred_type: Return a string of the type inferred from the values. + Examples -------- >>> idx = pd.Index([1, 2, 3]) @@ -1638,6 +1642,11 @@ def name(self) -> Hashable: """ Return Index or MultiIndex name. + See Also + -------- + Index.set_names: Able to set new names partially and by level. + Index.rename: Able to set new names partially and by level. + Examples -------- >>> idx = pd.Index([1, 2, 3], name="x") @@ -5175,6 +5184,12 @@ def equals(self, other: Any) -> bool: True if "other" is an Index and it has the same elements and order as the calling index; False otherwise. + See Also + -------- + Index.identical: Checks that object attributes and types are also 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])