将以数字命名的文档批量插入mysql数据库
import pandas as pd
for i in range(1,24):
data_info = pd.read_csv("文档地址"+str(i)+".csv") # utf8格式
from sqlalchemy import create_engine
engine = create_engine('mysql+mysqldb://用户名:密码@主机名:端口号/业务库?charset=utf8')
#将数据写入sql
pd.io.sql.to_sql(data_info,'t_market_car_order_0601',con = engine ,if_exists = 'append')