Skip to content

Commit b94f6d3

Browse files
KhemkaranKhemkaran
authored andcommitted
test name and test df change in test_drop.py
1 parent 022c6f5 commit b94f6d3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/tests/frame/methods/test_drop.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,13 @@ def test_drop_multiindex_other_level_nan(self):
346346
)
347347
tm.assert_frame_equal(result, expected)
348348

349-
def test_drop_with_both_axis_and_index(self):
350-
df = DataFrame({"a": [1, 2, 3], "b": ["foo", "foo", "bar"]})
349+
def test_drop_raise_with_both_axis_and_index(self):
350+
df = DataFrame(
351+
[[1, 2, 3], [3, 4, 5], [5, 6, 7]],
352+
index=["a", "b", "c"],
353+
columns=["d", "e", "f"],
354+
)
355+
351356
msg = "Cannot specify both 'axis' and 'index'/'columns'"
352357
with pytest.raises(ValueError, match=msg):
353358
df.drop(index="b", axis=1)

0 commit comments

Comments
 (0)