我从网上获得的代码将经过一个循环,以获取ms Access的所有数据。
`def access():
l =[]
conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\GOBOTIX\Desktop\Try.mdb;')
cursor = conn.cursor()
cursor.execute('select * from Try')
for row in cursor.fetchall():
l.append(row)
dates = [i[1] for i in l]
freq1 = [i[2] for i in l]
freq1 = list(map(int, freq1))
conn.close()
return dates, freq1`
我只想从某行开始,以减少将数据保存到excel的时间。