Skip to content
Advertisement

Insert into with Cursor.executemany and a Python list

Can someone please explain to me what is wrong with this code? I get the “parameters are of unsupported type” error. Is it not possible to feed a list into cursor.executemany? The type of the column is float not null.

Advertisement

Answer

The values for cursor.executemany must be a sequence of tuples:

This is a logical extension of cursor.execute requiring a single tuple for the values argument.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement