Skip to content

Commit 25222fa

Browse files
committed
Fix test
1 parent 792ccd0 commit 25222fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/tests/reshape/concat/test_index.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,11 @@ def test_concat_with_key_not_unique(self, performance_warning):
346346
performance_warning, match="indexing past lexsort depth"
347347
):
348348
out_a = df_a.loc[("x", 0), :]
349-
350349
df_b = DataFrame(
351-
{"name": [1, 2, 3]}, index=Index([("x", 0), ("y", 0), ("x", 0)])
350+
{"name": [1, 2, 3]},
351+
index=MultiIndex(
352+
levels=[["x", "y"], range(1)], codes=[[0, 1, 0], [0, 0, 0]]
353+
),
352354
)
353355
with tm.assert_produces_warning(
354356
performance_warning, match="indexing past lexsort depth"

0 commit comments

Comments
 (0)