Skip to content

Commit b3d9b28

Browse files
jorisvandenbosschenoatamir
authored andcommitted
PERF: keep using ObjectEngine for ExtensionArrays for 1.5 (pandas-dev#48472)
1 parent ece897c commit b3d9b28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/indexes/base.py

+3
Original file line numberDiff line numberDiff line change
@@ -5155,6 +5155,9 @@ def _get_engine_target(self) -> ArrayLike:
51555155
if isinstance(vals, StringArray):
51565156
# GH#45652 much more performant than ExtensionEngine
51575157
return vals._ndarray
5158+
if type(self) is Index and isinstance(self._values, ExtensionArray):
5159+
# TODO(ExtensionIndex): remove special-case, just use self._values
5160+
return self._values.astype(object)
51585161
return vals
51595162

51605163
def _from_join_target(self, result: np.ndarray) -> ArrayLike:

0 commit comments

Comments
 (0)