Python学习
文章平均质量分 66
其他垃圾!
自学Python,若有问题,请赐教
展开
-
【Python】数字1转换成字符0001
k = str(i)other_url = k.zfill(4)原创 2019-07-02 14:53:48 · 15722 阅读 · 2 评论 -
【Python】如何删除列表的一些符合条件的数据,并不会造成超出列表范围
num = len(word_list)flag = 0while(flag != num): if word_list[flag] in stopword_list: del word_list[flag] num -= 1 else: flag += 1原创 2019-07-02 15:00:25 · 4367 阅读 · 0 评论 -
【Python】词云制作
def wordcloud(im_path,word_dic):#利用关键词做出词云 #backgroud_Image = plt.imread('zhengxie.jpg') wc = WordCloud(background_color='white', # 背景颜色 max_words=2000, # 最大词数 ...原创 2019-07-02 16:23:20 · 309 阅读 · 1 评论 -
【Python】获取文件夹下的所有文件路径(包括子目录下的文件路径)
def get_all_path(open_file_path): rootdir = open_file_path path_list = [] list = os.listdir(rootdir) # 列出文件夹下所有的目录与文件 for i in range(0, len(list)): com_path = os.path.join(roo...原创 2019-07-02 16:29:12 · 11066 阅读 · 0 评论 -
【Python】爬取提案
import requestsfrom bs4 import BeautifulSoupimport csvfrom urllib import errordef judge(res): #判断网页是否具有内容 soup = BeautifulSoup(res.text, 'html.parser') value = soup.body['class'] #pri...原创 2019-07-02 16:57:30 · 148 阅读 · 0 评论 -
【Python】自然语言处理——实现批量文本的分词、提取关键词、制作词云思路
代码之后补加。原创 2019-07-03 10:29:24 · 3855 阅读 · 2 评论 -
【Python】文件处理——批量实现docx转以及将批量txt汇总成一个txt文件将批量txt汇总成一个txt文件思路
代码实现之后补加。原创 2019-07-03 11:21:12 · 2100 阅读 · 1 评论 -
【Python】word2vec学习资料[持续更新]
参考资料:https://www.jianshu.com/p/471d9bfbd72fhttps://blog.csdn.net/scotfield_msn/article/details/69075227https://www.jianshu.com/p/cede3ae146bbhttps://www.jianshu.com/p/f58c08ae44a6书籍推荐:...原创 2019-07-03 17:14:50 · 237 阅读 · 0 评论 -
【Python】文本关键词提取--基于tf-idf、textrank、lsi、lda算法
学习涂铭老师书籍《Python自然语言处理实战核心技术与算法》中关键词提取代码而做的笔记,意在理解内化代码,并对相关算法进行理解。原创 2019-07-18 15:09:43 · 3578 阅读 · 0 评论