Skip to content

Commit 89e3c8d

Browse files
committed
possible fix for missing datetime data types
1 parent 5541834 commit 89e3c8d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/reshape/merge.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,14 @@ def _maybe_add_join_keys(self, result, left_indexer, right_indexer):
832832

833833
# if we have an all missing left_indexer
834834
# make sure to just use the right values
835-
mask = left_indexer == -1
836-
if mask.all():
835+
mask_left = left_indexer == -1
836+
mask_right = right_indexer == -1
837+
if mask_left.all():
837838
key_col = rvals
839+
elif mask_right.all():
840+
key_col = lvals
838841
else:
839-
key_col = Index(lvals).where(~mask, rvals)
842+
key_col = Index(lvals).where(~mask_left, rvals)
840843

841844
if result._is_label_reference(name):
842845
result[name] = key_col

0 commit comments

Comments
 (0)