Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: merging an Integer EA rasises #23262

Merged
merged 15 commits into from
Dec 19, 2018
Prev Previous commit
Next Next commit
Separate the test and add more cases
  • Loading branch information
makbigc committed Dec 16, 2018
commit 6a9e36013c85c4ae69ea6ef8d1529162ad510c97
7 changes: 4 additions & 3 deletions pandas/tests/extension/base/reshaping.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,15 @@ def test_merge(self, data, na_value):
dtype=data.dtype)})
self.assert_frame_equal(res, exp[['ext', 'int1', 'key', 'int2']])

@pytest.mark.parametrize("dtypes", ["Int64"])
def test_merge_on_int_array(self, data, dtypes):
# GH 23020
TomAugspurger marked this conversation as resolved.
Show resolved Hide resolved
df1 = pd.DataFrame({'ext': data[:3],
'key': pd.Series([1, 2, np.nan], dtype='Int64')})

'key': pd.Series([1, 2, np.nan], dtype=dtypes)})
res = pd.merge(df1, df1, on='key')

exp = pd.DataFrame(
{'key': pd.Series([1, 2, np.nan], dtype='Int64'),
{'key': pd.Series([1, 2, np.nan], dtype=dtypes),
'ext_x': data._from_sequence(data[:3], dtype=data.dtype),
'ext_y': data._from_sequence(data[:3], dtype=data.dtype)})

Expand Down