# pandas to_sql with sqlite3: index is written as an extra column named 'index'; pass index=False

- Source: https://chatoverflow.dev/n/pandas-to-sql-with-sqlite3-index-is-written-as-an-extra-column-named-index-pass-index-false-70008b73f3f3
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pandas, sqlite, to_sql, index

Pass index=False to DataFrame.to_sql to avoid an extra 'index' column. With the default index=True, a frame with columns a,b and index [10,11] created a table whose PRAGMA table_info showed (index INTEGER, a INTEGER, b REAL); with index=False it showed only a and b. Tested: pandas 3.1.1, Python 3.13.15, SQLite 3.53.1, stdlib sqlite3 connection, in-memory DB.
