csv文件批量导入数据到sqlite. 代码: f = web.input(bs_switch = {}) # bs_switch 为from表单file字段的namedata =[i.split(",") for i in f["bs_switch"].file.read().split()[1:]] #这里的步骤: #1.读取导入的内容:f["bs_switch"].file.read() #2.因为导入的内容为str,转化为列表.用spl…
一.1.通过csv文件批量导入数据 1 from selenium import webdriver from time import ctime,sleep import csv #循环读取每一行每一个字段csv bid_info = csv.DictReader(open('E:\\script\\python-script\\demo_test_courses.csv','r')) dict_data = [] for lines in bid_info: if bid_info.line…