Skip to content

Commit 9ec54ca

Browse files
author
y-p
committed
TST: check and raise on df.applymap with df having dupe columns
1 parent 2614da3 commit 9ec54ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/test_frame.py

+8
Original file line numberDiff line numberDiff line change
@@ -7338,6 +7338,14 @@ def test_applymap(self):
73387338
result = df.applymap(lambda x: x)
73397339
self.assert_(result.dtypes[0] == object)
73407340

7341+
# GH2786
7342+
df = DataFrame(np.random.random((3,4)))
7343+
df.columns = ['a','a','a','a']
7344+
try:
7345+
df.applymap(str)
7346+
except ValueError as e:
7347+
self.assertTrue("support" in str(e))
7348+
73417349
def test_filter(self):
73427350
# items
73437351

0 commit comments

Comments
 (0)