I am using the pandas function read_csv to read a CSV with no index column.
read_csv("file.csv", header=1)
I was expecting that PANDAS would generate an index for each row based on the documentation
index_col: column number, column name, or list of column numbers/names, to use as the index (row labels) of the resulting DataFrame. By default, it will number the rows without using any column, unless there is one more data column than there are headers, in which case the first column is taken as the index.
However, while loading the file it throws,
Exception: Reindexing only valid with uniquely valued Index objects
And I cannot figure out why this would be the case. What causes this exception?
I have also tried passing skiprows and nrows and the same exception occurs.