Skip to content

Commit 11703aa

Browse files
committed
Added test for failure
1 parent dfb2651 commit 11703aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/frame/test_apply.py

+8
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,14 @@ def test_apply_non_numpy_dtype(self):
554554
result = df.apply(lambda x: x)
555555
assert_frame_equal(result, df)
556556

557+
def test_apply_dup_names_multi_agg(self):
558+
# GH 21063
559+
df = pd.DataFrame([[0, 1], [2, 3]], columns=['a', 'a'])
560+
expected = pd.DataFrame([[0, 1]], columns=['a', 'a'], index=['min'])
561+
result = df.agg(['min'])
562+
563+
tm.assert_frame_equal(result, expected)
564+
557565

558566
class TestInferOutputShape(object):
559567
# the user has supplied an opaque UDF where

0 commit comments

Comments
 (0)