from xlwt import *
导入xlwt,可以写出Excel格式文件
2
data=w.edb("S2701059", "2007-2-1", "2016-12-18","Fill=Previous")
从接口中获得数据,并且赋值给data
3 file = Workbook() table = file.add_sheet('ww') for i in range(len(data.Times)): table.write(i, 0, str(data.Times[i])[0:7])
输出时间序列 for i in range(len(data.Data)): print data.Data[i] for j in range(len(data.Data[i])): table.write(j, i+1, str(round(data.Data[i][j],1))) file.save('C:\Users\sonxians\Desktop\Other Development Investment.xls')
将数组中的值全部输出