Importing CSV file into a PostgreSQL table
I used psql to push the CSV file to the table, as suggested by @a_horse_with_no_name. 

psql -h port -d db -U user -c "\copy products from 'products.csv' with delimiter as ',' csv header;"


It only took a couple of minutes to copy the table, compared to 10+ hours with the python script.