摘要: 使用for filePath,content in corpos.itertuples(index=False)遍历两行数据 问题:在遍历pandas进行分词时,并将修改后的文本写入源文件 一开始使用for content in corpos['content'], 虽然content有遍历,但是f 阅读全文
posted @ 2016-05-20 13:25 草莓干123456 阅读(3040) 评论(0) 推荐(0) 编辑
摘要: 中文信息处理课,老师让写个字频统计的程序,我能够写出来,但是运行速度很慢。 希望路过的大神给我提点意见。 import osimport os.pathimport codecsimport pandasimport numpyimport jieba #创建词库corpos = pandas.Da 阅读全文
posted @ 2016-05-20 13:10 草莓干123456 阅读(872) 评论(0) 推荐(0) 编辑