Reputation: 23567
When i am trying to read the fixed width file, it gives me that
Exception: Index (columns 0) have duplicated values ['12345']
The thing is, even though I have duplicated values, I still want the data incorporated. How could one get around this?
Upvotes: 0
Views: 401
Reputation: 49856
Try calling read_fwf()
with argument index_col=None
to tell it that there are no index columns (which must be unique over all rows) -- it will automatically index rows with an integer starting at zero.
Upvotes: 1