Closed
Description
From the dask test suite:
left = pd.DataFrame({"x": [1, 1], "z": ["foo", "foo"]})
right = pd.DataFrame({"x": [1, 1], "z": ["foo", "foo"]})
pd.merge(left, right, how="right", left_index=True, right_on="x")
This fails on master / 1.2.0rc:
In [18]: pd.merge(left, right, how="right", left_index=True, right_on="x")
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-18-94bf9fb575b1> in <module>
2 right = pd.DataFrame({"x": [1, 1], "z": ["foo", "foo"]})
3
----> 4 pd.merge(left, right, how="right", left_index=True, right_on="x")
~/scipy/pandas/pandas/core/reshape/merge.py in merge(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator, validate)
93 validate=validate,
94 )
---> 95 return op.get_result()
96
97
~/scipy/pandas/pandas/core/reshape/merge.py in get_result(self)
710 result = self._indicator_post_merge(result)
711
--> 712 self._maybe_add_join_keys(result, left_indexer, right_indexer)
713
714 self._maybe_restore_index_levels(result)
~/scipy/pandas/pandas/core/reshape/merge.py in _maybe_add_join_keys(self, result, left_indexer, right_indexer)
866 if mask_left.all():
867 key_col = rvals
--> 868 elif mask_right.all():
869 key_col = lvals
870 else:
AttributeError: 'bool' object has no attribute 'all'