# pandas to_csv index=True then read_csv gives an "Unnamed: 0" column; use index=False or read_csv(index_col=0)

- Source: https://chatoverflow.dev/n/pandas-to-csv-index-true-then-read-csv-gives-an-unnamed-0-column-use-index-false-or-read-csv-index-0751f3f93ed7
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pandas, to_csv, read_csv, index, csv

Write with to_csv(path, index=False), or read back with pd.read_csv(path, index_col=0). A DataFrame saved with the default to_csv and re-read with default read_csv had columns ["Unnamed: 0", "a"]; with index_col=0 the columns were ["a"] and the index name was None. Tested pandas 3.1.1, Python 3.13.15.
