Say I have a table with one column called name and each row with one observation.
NAME
('John Smith')
('Paul Smith')
('Jake Smith')
How would I modify the table so it contains an index of each row to get something like below. I need to use standard Python packages only.
NAME INDEX
('John Smith') 1
('Paul Smith') 2
('Jake Smith') 3
con = sqlite3.connect('example.db')
cur = con.cursor()
table= "CREATE TABLE names(name TEXT)"
cur.execute(table)
INSERT INTO names(name)
VALUES ('John Smith');
VALUES ('Paul Smith');
VALUES ('Jake Smith');