|
15 | 15 | (["UInt8", "Int8"], "Int16"),
|
16 | 16 | (["Int32", "UInt32"], "Int64"),
|
17 | 17 | (["Int64", "UInt64"], "Float64"),
|
18 |
| - (["Int64", "boolean"], "Int64"), |
19 |
| - (["UInt8", "boolean"], "UInt8"), |
| 18 | + (["Int64", "boolean"], "object"), |
| 19 | + (["UInt8", "boolean"], "object"), |
20 | 20 | ],
|
21 | 21 | )
|
22 | 22 | def test_concat_series(to_concat_dtypes, result_dtype):
|
| 23 | + # we expect the same dtypes as we would get with non-masked inputs, |
| 24 | + # just masked where available. |
23 | 25 |
|
24 | 26 | result = pd.concat([pd.Series([0, 1, pd.NA], dtype=t) for t in to_concat_dtypes])
|
25 | 27 | expected = pd.concat([pd.Series([0, 1, pd.NA], dtype=object)] * 2).astype(
|
@@ -47,11 +49,13 @@ def test_concat_series(to_concat_dtypes, result_dtype):
|
47 | 49 | (["UInt8", "int8"], "Int16"),
|
48 | 50 | (["Int32", "uint32"], "Int64"),
|
49 | 51 | (["Int64", "uint64"], "Float64"),
|
50 |
| - (["Int64", "bool"], "Int64"), |
51 |
| - (["UInt8", "bool"], "UInt8"), |
| 52 | + (["Int64", "bool"], "object"), |
| 53 | + (["UInt8", "bool"], "object"), |
52 | 54 | ],
|
53 | 55 | )
|
54 | 56 | def test_concat_series_with_numpy(to_concat_dtypes, result_dtype):
|
| 57 | + # we expect the same dtypes as we would get with non-masked inputs, |
| 58 | + # just masked where available. |
55 | 59 |
|
56 | 60 | s1 = pd.Series([0, 1, pd.NA], dtype=to_concat_dtypes[0])
|
57 | 61 | s2 = pd.Series(np.array([0, 1], dtype=to_concat_dtypes[1]))
|
|
0 commit comments