We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9de374 commit e19e820Copy full SHA for e19e820
pandas/tests/reshape/concat/test_concat.py
@@ -335,11 +335,19 @@ def test_concat_mixed_objs_index_names(self):
335
s2 = Series(arr, index=index, name="bar")
336
df = DataFrame(arr.reshape(-1, 1), index=index)
337
338
- expected = concat([s1.to_frame(), df, s2.to_frame()])
+ expected = DataFrame(
339
+ np.kron(np.where(np.identity(3) == 1, 1, np.nan), arr).T,
340
+ index=index.tolist() * 3,
341
+ columns=["foo", 0, "bar"],
342
+ )
343
result = concat([s1, df, s2])
344
tm.assert_frame_equal(result, expected)
345
- expected = concat([s1.to_frame(), df, s2.to_frame()], ignore_index=True)
346
347
348
+ index=np.arange(30, dtype=np.int64),
349
350
351
result = concat([s1, df, s2], ignore_index=True)
352
353
0 commit comments