I have created a sqlite database using pandas df.to_sql however accessing it seems considerably slower than just reading in the 500mb csv file.
I need to:
There's no way to do that. You can only set the primary key directly in the database after you move the data.