diff --git a/ci/code_checks.sh b/ci/code_checks.sh index d1cdff8f7f56b..57c47096f1bc8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -143,7 +143,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Index PR07" \ -i "pandas.Index.T SA01" \ -i "pandas.Index.append PR07,RT03,SA01" \ - -i "pandas.Index.astype SA01" \ -i "pandas.Index.copy PR07,SA01" \ -i "pandas.Index.difference PR07,RT03,SA01" \ -i "pandas.Index.drop PR07,SA01" \ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 8ede401f37184..fb48aa5ba187c 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1056,6 +1056,12 @@ def astype(self, dtype, copy: bool = True): Index Index with values cast to specified dtype. + See Also + -------- + Index.dtype: Return the dtype object of the underlying data. + Index.dtypes: Return the dtype object of the underlying data. + Index.convert_dtypes: Convert columns to the best possible dtypes. + Examples -------- >>> idx = pd.Index([1, 2, 3])