Jump to content
Fórum Script Brasil

astatonn

Membros
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutro

About astatonn

  1. Ola, Gostaria de ler um arquivo csv e cada valor estar dentro de aspas simples. Segue meu código: def InsertData (check_enter, Table): with open (check_enter, encoding="utf8") as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') next(csv_reader) for row in csv_reader: row = (', '.join(row)) sql = "INSERT INTO {} VALUES ({})".format(Table,row) # cursor.execute(sql) # db.commit() print (sql) saída: INSE
×
×
  • Create New...