摘要: # 序列化对象 import pickle mylist=[[1,2,3,4,5,6,7],["abc","xyz","hello"],[1,2,3,4,5,6,7,"我","w"]] file=open(r"G:\我的python\尹成\python基础\day11\文件读写\list.bin","wb") pickle.dump(mylist,file) # 保存list到文件 fil... 阅读全文
posted @ 2018-07-23 11:49 睡觉了嘛 阅读(83) 评论(0) 推荐(0) 编辑
摘要: from string import Template print(type(Template)) mystr = Template("hi,$name 你是$baby") print(mystr.substitute(name = "边真", baby = "lovely ")) # 结果 hi,边真 你是lovely 阅读全文
posted @ 2018-07-23 11:41 睡觉了嘛 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 文件分类的一般流程 事例一. 事例二 事例三 (按照身份证号码取) 阅读全文
posted @ 2018-07-23 11:22 睡觉了嘛 阅读(2816) 评论(0) 推荐(0) 编辑
摘要: 方法一 : 使用python的内置函数 结果 方法2 使用匿名函数 结果 阅读全文
posted @ 2018-07-23 11:16 睡觉了嘛 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 输出结果 阅读全文
posted @ 2018-07-23 11:07 睡觉了嘛 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1.数据处理之前先进行数据清洗,把自己所需要的好的数据提取出来 2.数据提取,数据清洗之后就要从中提取出自己所需要的部分 3.数据排序 从提取的数据中 按照自己的需要进行排序 4.排序计数 把重复一样的统计出来 5.数据分类 阅读全文
posted @ 2018-07-23 11:06 睡觉了嘛 阅读(144) 评论(0) 推荐(0) 编辑