Skip to content

Commit 22e5247

Browse files
authored
DOC: Fix SA01 errors for pandas.Index.astype (#58352)
* pandas.Index.astype * check fixes * series to index
1 parent e714aca commit 22e5247

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
129129
-i "pandas.Index PR07" \
130130
-i "pandas.Index.T SA01" \
131131
-i "pandas.Index.append PR07,RT03,SA01" \
132-
-i "pandas.Index.astype SA01" \
133132
-i "pandas.Index.copy PR07,SA01" \
134133
-i "pandas.Index.difference PR07,RT03,SA01" \
135134
-i "pandas.Index.drop PR07,SA01" \

pandas/core/indexes/base.py

+6
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,12 @@ def astype(self, dtype, copy: bool = True):
10601060
Index
10611061
Index with values cast to specified dtype.
10621062
1063+
See Also
1064+
--------
1065+
Index.dtype: Return the dtype object of the underlying data.
1066+
Index.dtypes: Return the dtype object of the underlying data.
1067+
Index.convert_dtypes: Convert columns to the best possible dtypes.
1068+
10631069
Examples
10641070
--------
10651071
>>> idx = pd.Index([1, 2, 3])

0 commit comments

Comments
 (0)