Skip to content

Commit

Permalink
DOC: Fix SA01 errors for pandas.Index.astype (pandas-dev#58352)
Browse files Browse the repository at this point in the history
* pandas.Index.astype

* check fixes

* series to index
  • Loading branch information
Nrezhang authored Apr 22, 2024
1 parent e714aca commit 22e5247
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,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" \
Expand Down
6 changes: 6 additions & 0 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,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])
Expand Down

0 comments on commit 22e5247

Please sign in to comment.