Skip to content

Commit 2bc24d5

Browse files
authored
CLN: avoid _ndarray_values in reshape.merge (#32693)
1 parent 8d654ca commit 2bc24d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/reshape/merge.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1657,10 +1657,13 @@ def _get_merge_keys(self):
16571657
def _get_join_indexers(self):
16581658
""" return the join indexers """
16591659

1660-
def flip(xs):
1660+
def flip(xs) -> np.ndarray:
16611661
""" unlike np.transpose, this returns an array of tuples """
16621662
xs = [
1663-
x if not is_extension_array_dtype(x) else x._ndarray_values for x in xs
1663+
x
1664+
if not is_extension_array_dtype(x)
1665+
else extract_array(x)._values_for_argsort()
1666+
for x in xs
16641667
]
16651668
labels = list(string.ascii_lowercase[: len(xs)])
16661669
dtypes = [x.dtype for x in xs]

0 commit comments

Comments
 (0)