Skip to content

Commit 5e6db32

Browse files
author
y-p
committed
TST: DF should not error when 'columns' is a list that contains dupes
test_getitem_list_duplicates() shows that the same works for numpy arrays.
1 parent 04d8228 commit 5e6db32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/tests/test_frame.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# pylint: disable-msg=W0612,E1101
2+
from __future__ import with_statement
23
from copy import deepcopy
34
from datetime import datetime, timedelta
45
from StringIO import StringIO
@@ -1107,6 +1108,9 @@ def test_getitem_list_duplicates(self):
11071108
expected = df.ix[:, 2:]
11081109
assert_frame_equal(result, expected)
11091110

1111+
def test_dupes_in_col_list (self):
1112+
DataFrame([[8,5]],columns=["a","a"])
1113+
11101114
def test_get_value(self):
11111115
for idx in self.frame.index:
11121116
for col in self.frame.columns:

0 commit comments

Comments
 (0)