Skip to content

Commit 2d61a12

Browse files
committed
Merge remote-tracking branch 'upstream/master' into multi-index-join
2 parents b581789 + 40dfadd commit 2d61a12

File tree

5 files changed

+7
-507
lines changed

5 files changed

+7
-507
lines changed

ci/appveyor-27.yaml

-31
This file was deleted.

ci/appveyor-36.yaml

-28
This file was deleted.

ci/travis-35-osx.yaml

-28
This file was deleted.

pandas/core/indexes/base.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -3940,10 +3940,11 @@ def _join_multi(self, other, how, return_indexers=True):
39403940
self_is_mi = isinstance(self, MultiIndex)
39413941
other_is_mi = isinstance(other, MultiIndex)
39423942

3943-
# figure out join names
3944-
self_names = com._not_none(*self.names)
3945-
other_names = com._not_none(*other.names)
3946-
overlap = list(set(self_names) & set(other_names))
3943+
if self_is_mi and other_is_mi:
3944+
3945+
# Drop the non matching levels
3946+
ldrop_levels = list(set(self_names) - set(overlap))
3947+
rdrop_levels = list(set(other_names) - set(overlap))
39473948

39483949
self_jnlevels = self.droplevel(ldrop_levels)
39493950
other_jnlevels = other.droplevel(rdrop_levels)

0 commit comments

Comments
 (0)