File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -653,12 +653,12 @@ def get_chunk(self, rows=None):
653
653
else :
654
654
index = Index (np .arange (len (content )))
655
655
656
- if not index .is_unique :
657
- dups = index .get_duplicates ()
658
- idx_str = 'Index' if not self ._implicit_index else 'Implicit index'
659
- err_msg = ('%s (columns %s) have duplicate values %s'
660
- % (idx_str , self .index_col , str (dups )))
661
- raise Exception (err_msg )
656
+ # if not index.is_unique:
657
+ # dups = index.get_duplicates()
658
+ # idx_str = 'Index' if not self._implicit_index else 'Implicit index'
659
+ # err_msg = ('%s (columns %s) have duplicate values %s'
660
+ # % (idx_str, self.index_col, str(dups)))
661
+ # raise Exception(err_msg)
662
662
663
663
if len (self .columns ) != len (zipped_content ):
664
664
raise Exception ('wrong number of columns' )
Original file line number Diff line number Diff line change @@ -325,8 +325,10 @@ def test_read_table_duplicate_index(self):
325
325
bar,12,13,14,15
326
326
"""
327
327
328
- self .assertRaises (Exception , read_csv , StringIO (data ),
329
- index_col = 0 )
328
+ result = read_csv (StringIO (data ), index_col = 0 )
329
+ expected = read_csv (StringIO (data )).set_index ('index' ,
330
+ verify_integrity = False )
331
+ assert_frame_equal (result , expected )
330
332
331
333
def test_read_table_duplicate_index_implicit (self ):
332
334
data = """A,B,C,D
@@ -338,8 +340,8 @@ def test_read_table_duplicate_index_implicit(self):
338
340
bar,12,13,14,15
339
341
"""
340
342
341
- self . assertRaises ( Exception , read_csv , StringIO ( data ),
342
- index_col = 0 )
343
+ # it works!
344
+ result = read_csv ( StringIO ( data ) )
343
345
344
346
def test_parse_bools (self ):
345
347
data = """A,B
You can’t perform that action at this time.
0 commit comments