import pandas as pd file=pd.read_excel('bb.xlsx') column = list(file.columns) for i in range(len(file)): x = [file.iloc[i][x] for x in range(len(column))] print("insert into table (%s) values (%s);"%(str(column).replace('[','').replace(']','').replace('','').replace("",''),str(x).replace("[","").replace(']','')))
标签:insert,pd,column,excel,replace,file,快速 From: https://www.cnblogs.com/xkdn/p/17233062.html