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