Skip to content

Commit 079cde5

Browse files
test that frame_apply throws on invalid func+axis
1 parent 3384b83 commit 079cde5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tests/apply/test_frame_apply.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,10 @@ def test_agg_reduce(axis, float_frame):
13291329
expected = expected.T if axis in {1, "columns"} else expected
13301330
tm.assert_frame_equal(result, expected)
13311331

1332+
msg = "func given to frame_apply cannot contain an index relabeling when axis is 1"
1333+
with pytest.raises(NotImplementedError, match=msg):
1334+
float_frame.agg(row1=(name1, "sum"), row2=(name2, "max"), axis=1)
1335+
13321336

13331337
def test_nuiscance_columns():
13341338
# GH 15015

0 commit comments

Comments
 (0)