Skip to content

Commit 41c9116

Browse files
DOC: add RT03,SA01 for pandas.api.extensions.ExtensionArray.copy (#58704)
* DOC: add RT03,SA01 for pandas.api.extensions.ExtensionArray.copy * DOC: remove RT03,SA01 for pandas.api.extensions.ExtensionArray.copy
1 parent 9cc5364 commit 41c9116

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
322322
-i "pandas.api.extensions.ExtensionArray._reduce RT03,SA01" \
323323
-i "pandas.api.extensions.ExtensionArray._values_for_factorize SA01" \
324324
-i "pandas.api.extensions.ExtensionArray.astype SA01" \
325-
-i "pandas.api.extensions.ExtensionArray.copy RT03,SA01" \
326325
-i "pandas.api.extensions.ExtensionArray.dropna RT03,SA01" \
327326
-i "pandas.api.extensions.ExtensionArray.dtype SA01" \
328327
-i "pandas.api.extensions.ExtensionArray.duplicated RT03,SA01" \

pandas/core/arrays/base.py

+10
Original file line numberDiff line numberDiff line change
@@ -1604,9 +1604,19 @@ def copy(self) -> Self:
16041604
"""
16051605
Return a copy of the array.
16061606
1607+
This method creates a copy of the `ExtensionArray` where modifying the
1608+
data in the copy will not affect the original array. This is useful when
1609+
you want to manipulate data without altering the original dataset.
1610+
16071611
Returns
16081612
-------
16091613
ExtensionArray
1614+
A new `ExtensionArray` object that is a copy of the current instance.
1615+
1616+
See Also
1617+
--------
1618+
DataFrame.copy : Return a copy of the DataFrame.
1619+
Series.copy : Return a copy of the Series.
16101620
16111621
Examples
16121622
--------

0 commit comments

Comments
 (0)