摘要: import os,sys def delblankline(infile,outfile): infopen = open(infile) outfopen = open(outfile,'w') lines = infopen.readlines() for line in lines: if line.split(): ... 阅读全文
posted @ 2017-04-25 11:19 zhgmyron 阅读(125) 评论(0) 推荐(0) 编辑
摘要: import openpyxl,csv,os exl=openpyxl.Workbook() for csvfile in os.listdir("."): if not csvfile.endswith(".csv"): continue print('change csv file ' + csvfile + '...') csvrow=[] ... 阅读全文
posted @ 2017-03-14 17:22 zhgmyron 阅读(453) 评论(0) 推荐(0) 编辑
摘要: import openpyxl start_line= int(input("enter start:")) m=int(input("blank:")) exl= openpyxl.load_workbook("produceSales.xlsx",data_only=True) sheet = exl.get_sheet_by_name("Sheet") r=sheet.max_row c=... 阅读全文
posted @ 2017-03-13 16:54 zhgmyron 阅读(1735) 评论(0) 推荐(0) 编辑
摘要: 1.基础 数据库》集合》文档 例子:test》blog》{"hello":3} 多个键/值对组成文档 文档:{"hello":3} 多个文档组成集合, 多个集合组成数据库。 2.操作 2.1 插入(inesrt): db.blog.insert({"hello":3}); 2.2 批量插入(inse 阅读全文
posted @ 2016-11-10 17:39 zhgmyron 阅读(125) 评论(0) 推荐(0) 编辑
摘要: import requests,json import urllib url='http://apis.baidu.com/txapi/mvtp/meinv' path='F:\\screen\\baidu\\' headers={'apikey':XXXX} page_links=[] names=[] def get_url(num): payload={'num':num} ... 阅读全文
posted @ 2016-11-10 16:23 zhgmyron 阅读(785) 评论(0) 推荐(0) 编辑