Skip to content

Commit

Permalink
PERF: avoid unnecessary copy (#59630)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored Aug 27, 2024
1 parent 306385b commit eb05b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/core/arrays/string_.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def __arrow_array__(self, type=None):
return pa.array(values, type=type, from_pandas=True)

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

return arr, self.dtype.na_value

Expand Down

0 comments on commit eb05b13

Please sign in to comment.