'Python SQLite is not inserting values into table [closed]

So I'm trying to insert values into a DB table that's been created but it returns the error found here:

enter image description here

the database does have a lot of NaN values but I cannot figure out why this does not work, any ideas?



Solution 1:[1]

You need to allow the database connector to do the substitution. You are trying to add the word nan, and SQLite doesn't understand that. The connector would replace that with NULL.

So, change the SQL to "...VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", then use

cursor.execute(parameters, row[1:])

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim Roberts