We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56a7184 commit 92b465eCopy full SHA for 92b465e
pandas/core/reshape/merge.py
@@ -967,16 +967,11 @@ def _maybe_add_join_keys(
967
# if we have an all missing left_indexer
968
# make sure to just use the right values or vice-versa
969
mask_left = left_indexer == -1
970
- mask_right = right_indexer == -1
971
# error: Item "bool" of "Union[Any, bool]" has no attribute "all"
972
if mask_left.all(): # type: ignore[union-attr]
973
key_col = Index(rvals)
974
result_dtype = rvals.dtype
975
- # error: Item "bool" of "Union[Any, bool]" has no attribute "all"
976
- elif (
977
- right_indexer is not None
978
- and mask_right.all() # type: ignore[union-attr]
979
- ):
+ elif right_indexer is not None and (right_indexer == -1).all():
980
key_col = Index(lvals)
981
result_dtype = lvals.dtype
982
else:
0 commit comments