2019年5月13日

python中修改execl、xlrd、xlutils

摘要: import xlrdfrom xlutils import copybook = xlrd.open_workbook('students.xls')sheet0 = book.sheet_by_index(0) # 获取原来的数据new_book = copy.copy(book)sheet = 阅读全文

posted @ 2019-05-13 21:12 dongxl 阅读(649) 评论(0) 推荐(0)

python中写日志log

摘要: import nnloglog = nnlog.Logger('test.log',level='error',backCount=5,when='D') #默认是debug级别最低的,默认保留5天的backCount when='D' # D H M S D=天,H=小时,M=分钟 S=秒log. 阅读全文

posted @ 2019-05-13 21:08 dongxl 阅读(504) 评论(0) 推荐(0)

python中操作redis

摘要: import redishost = '110.24.3.70'passwd = 'HK0000'r = redis.Redis(host=host, password=passwd, db=15, decode_responses=True) # 0-15# decode_responses=Tr 阅读全文

posted @ 2019-05-13 21:01 dongxl 阅读(512) 评论(0) 推荐(0)

python中读取execl、xlrd

摘要: import xlrdbook = xlrd.open_workbook('CJ_test.xls')sheet = book.sheet_by_index(0)print(sheet.row_values(0)) # 某一行的数据print(sheet.col_values(0)) # 某一列的数 阅读全文

posted @ 2019-05-13 20:50 dongxl 阅读(211) 评论(0) 推荐(0)

python调用接口requests

摘要: import requests# get方式,输入查询条件,查询数据url='http://api.nnzhp.cn/api/user/stu_info'd = {'stu_name':'矿泉水2'}req = requests.get(url,d)print(req.json()) #字典prin 阅读全文

posted @ 2019-05-13 20:47 dongxl 阅读(3329) 评论(0) 推荐(0)

导航