上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: python中如果需要进一步处理文件内容,可以将文本内容导入list列表。# -*- coding:utf-8 -*-f = open(r'dict.txt',encoding = "utf-8")a = lis... 阅读全文
posted @ 2020-03-01 11:24 HelenLee01 阅读(2532) 评论(0) 推荐(0) 编辑
摘要: 如果读取文件的时候发现只读取了前面的部分,后面的部分没有读取到怎么办?可以试试使用readlines()函数。f = open('gp2.txt',encoding = 'utf-8')for line in ... 阅读全文
posted @ 2020-03-01 11:20 HelenLee01 阅读(713) 评论(0) 推荐(0) 编辑
摘要: 主要步骤:1.读取文件2.jieba分词3.写入文件完整代码如下:import jiebafR = open('gp.txt', 'r', encoding='UTF-8') //读取文件sent = fR.r... 阅读全文
posted @ 2020-02-13 20:21 HelenLee01 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 报错:module 'jieba' has no attribute 'cut'原因:文件名为 jieba.py解决办法:更改文件名拓展:初学者在学习的过程中有时会直接把文件命名为所学内容,恰好和import的包... 阅读全文
posted @ 2020-02-13 20:14 HelenLee01 阅读(317) 评论(0) 推荐(0) 编辑
摘要: python报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 14: illegal multibyte sequence... 阅读全文
posted @ 2020-02-13 19:48 HelenLee01 阅读(2022) 评论(0) 推荐(0) 编辑
摘要: 原因:pip安装包经常失败,原因是网速慢,国外服务器连接超时,默认15s解决办法:先下载,后安装1.打开 https://www.lfd.uci.edu/~gohlke/pythonlibs/ (里面有几乎所有... 阅读全文
posted @ 2020-02-13 10:48 HelenLee01 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 最简单的地图热力图,用的是百度的api,所以取经纬度的时候最好也用百度地图。这里已经填好百度api的key了,但还是建议大家注册使用自己的key,因为有每日额度,超过访问次数了就不可用了。效果展示: 下面是完整代... 阅读全文
posted @ 2020-02-10 10:42 HelenLee01 阅读(2088) 评论(1) 推荐(0) 编辑
摘要: XAMPP的Apache用不了,一直报错:Error: Apache shutdown unexpectedly. 11:00:50 [Apache] This may be due to a b... 阅读全文
posted @ 2019-06-21 11:46 HelenLee01 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 进入文件夹,返回上级目录,查看列表文件cd ..返回上级目录(更高一级目录)cd / (返回上级目录)cd // (返回上上级目录)cd home (进入home文件夹)cd zdxh (进入zdxh文件夹)... 阅读全文
posted @ 2019-05-31 15:45 HelenLee01 阅读(1297) 评论(0) 推荐(0) 编辑
摘要: 添加新用户 adduser user01 (需要用管理员的权限才能添加新用户)输入密码su user01(切换到user01) 阅读全文
posted @ 2019-05-31 15:43 HelenLee01 阅读(67) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页