dataframe_list=df.values.tolist()
Conn = pyodbc.connect('Driver={Oracle};DBQ=DB_NAME;Uid=user_Name;Pwd=xxxxxxxx')
cursor = conn.cursor()
str_query = "INSERT INTO schema.Table(Year,BRAND,Model,Color,Country,State,City,Dealer,Month,sales,Adjusted_Sales,Price,ROW_INSERTED_DATE) VALUES ('{}', '{}', '{}', '{}', '{}', '{}', '{}', '{}', '{}', '{}', '{}', '{}', '{}',);"
for index,elem in enumerate(dataframe_list): #iterating the list using index(int)
cursor.execute(str_query,dataframe_list[index])
I am trying to load this list into Oracle table. I'm getting the the below error
ProgrammingErrorTraceback (most recent call last)
<ipython-input-38-352f29f650d7> in <module>()
1 for index,elem in enumerate(dataframe_list): #iterating the list using index(int)
----> 2 cursor.execute(str_query,dataframe_list[index])
ProgrammingError: ('The SQL contains 0 parameter markers, but 13 parameters were supplied', 'HY000').
I have sqlalchemy, but not able to install cx_Oracle. I can read from Oracle using pyodbc. I am looking for writing a dataframe or list (which is converted from Dataframe) to Oracle.