Skip to content

Commit 49ca1ef

Browse files
toobazjreback
authored andcommitted
TST: test reset_index with tuple index name and col_level!=0 (pandas-dev#16195)
1 parent e19a0ff commit 49ca1ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/test_multilevel.py

+5
Original file line numberDiff line numberDiff line change
@@ -2286,6 +2286,11 @@ def test_reset_index_multiindex_columns(self):
22862286
"incomplete column name \('C', 'c'\)")):
22872287
df2.rename_axis([('C', 'c')]).reset_index(col_fill=None)
22882288

2289+
# with col_level != 0
2290+
result = df2.rename_axis([('c', 'ii')]).reset_index(col_level=1,
2291+
col_fill='C')
2292+
tm.assert_frame_equal(result, expected)
2293+
22892294
def test_set_index_period(self):
22902295
# GH 6631
22912296
df = DataFrame(np.random.random(6))

0 commit comments

Comments
 (0)