Skip to content

Commit

Permalink
DOC: add RT03,SA01 for pandas.api.extensions.ExtensionArray.copy (#58704
Browse files Browse the repository at this point in the history
)

* DOC: add RT03,SA01 for pandas.api.extensions.ExtensionArray.copy

* DOC: remove RT03,SA01 for pandas.api.extensions.ExtensionArray.copy
  • Loading branch information
tuhinsharma121 committed May 13, 2024
1 parent 9cc5364 commit 41c9116
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Expand Up @@ -322,7 +322,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.api.extensions.ExtensionArray._reduce RT03,SA01" \
-i "pandas.api.extensions.ExtensionArray._values_for_factorize SA01" \
-i "pandas.api.extensions.ExtensionArray.astype SA01" \
-i "pandas.api.extensions.ExtensionArray.copy RT03,SA01" \
-i "pandas.api.extensions.ExtensionArray.dropna RT03,SA01" \
-i "pandas.api.extensions.ExtensionArray.dtype SA01" \
-i "pandas.api.extensions.ExtensionArray.duplicated RT03,SA01" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/arrays/base.py
Expand Up @@ -1604,9 +1604,19 @@ def copy(self) -> Self:
"""
Return a copy of the array.
This method creates a copy of the `ExtensionArray` where modifying the
data in the copy will not affect the original array. This is useful when
you want to manipulate data without altering the original dataset.
Returns
-------
ExtensionArray
A new `ExtensionArray` object that is a copy of the current instance.
See Also
--------
DataFrame.copy : Return a copy of the DataFrame.
Series.copy : Return a copy of the Series.
Examples
--------
Expand Down

0 comments on commit 41c9116

Please sign in to comment.