From ab9d8c9efefbafda10126f4e7049d2d38db62459 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Fri, 13 Mar 2020 16:30:55 -0700 Subject: [PATCH] CLN: avoid _ndarray_values in reshape.merge --- pandas/core/reshape/merge.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index aeec2a43f39bf..85386923e9912 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -1657,10 +1657,13 @@ def _get_merge_keys(self): def _get_join_indexers(self): """ return the join indexers """ - def flip(xs): + def flip(xs) -> np.ndarray: """ unlike np.transpose, this returns an array of tuples """ xs = [ - x if not is_extension_array_dtype(x) else x._ndarray_values for x in xs + x + if not is_extension_array_dtype(x) + else extract_array(x)._values_for_argsort() + for x in xs ] labels = list(string.ascii_lowercase[: len(xs)]) dtypes = [x.dtype for x in xs]