I am writing a script that reads data from excel files and writes into a postgresql database. I have read data from the excel file and stored each row data as an array of strings.
I tried a couple of things, like
for x in range(len(sh.columns)):
i = users.insert()
i.execute({sh.columns[x] : sh.values[0][x]})
Here is the reference to my Excel sheet and the table I'm editing in the postgreSQL database I referred to by users.
I also tried an
'INSERT INTO users VALUES %s'%(tuple(sh.values[0])
and a few more variations of that.