We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3512e24 commit fe5a3d8Copy full SHA for fe5a3d8
pandas/core/reshape/merge.py
@@ -966,15 +966,13 @@ 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]
+ and (right_indexer == -1).all()
978
):
979
key_col = Index(lvals)
980
result_dtype = lvals.dtype
0 commit comments