Skip to content

Commit 9e85c21

Browse files
committed
PERF: avoid unnecessary copy
1 parent 172e477 commit 9e85c21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/arrays/string_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def __arrow_array__(self, type=None):
660660
return pa.array(values, type=type, from_pandas=True)
661661

662662
def _values_for_factorize(self) -> tuple[np.ndarray, libmissing.NAType | float]: # type: ignore[override]
663-
arr = self._ndarray.copy()
663+
arr = self._ndarray
664664

665665
return arr, self.dtype.na_value
666666

0 commit comments

Comments
 (0)