
python
KinG-177
这个作者很懒,什么都没留下…
展开
-
python处理excel文件
import xlrd, xlwt readbook = xlrd.open_workbook('a.xls') # sheet = readbook.sheet_by_index(1)#索引的方式,从0开始 sheet = readbook.sheet_by_name('使用方法')#名字的方式 nrows = sheet.nrows#行 ncols = sheet.ncols#列 print(nrows) print(ncols) lng = sheet.cell(0,0).value#获取i行3列.原创 2021-07-16 12:35:41 · 104 阅读 · 0 评论 -
python 生成等差数列
import numpy as np import numpy as np def shulie(first,end,step): x = [] for i in np.arange(first, end,step): x.append(i) return x first --首个数字 end--尾数字 step--间隔 ...原创 2020-03-01 00:24:15 · 12319 阅读 · 0 评论