Skip to content

Commit 8560bc5

Browse files
String dtype: fix alignment sorting in case of python storage
1 parent 0bcbef2 commit 8560bc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/indexes/base.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4884,7 +4884,10 @@ def _can_use_libjoin(self) -> bool:
48844884
return (
48854885
isinstance(self.dtype, np.dtype)
48864886
or isinstance(self._values, (ArrowExtensionArray, BaseMaskedArray))
4887-
or self.dtype == "string[python]"
4887+
or (
4888+
isinstance(self.dtype, StringDtype)
4889+
and self.dtype.storage == "python"
4890+
)
48884891
)
48894892
# Exclude index types where the conversion to numpy converts to object dtype,
48904893
# which negates the performance benefit of libjoin

0 commit comments

Comments
 (0)