Python
飞向海洋的猪
IT从业者,社畜一枚,高级CV工程师。
展开
-
将Excel文件都转换为csv格式文件,并删除原文件
将某个目录下所有非csv后缀的excel文件转换为csv文件,并改变目录。同时将原数据删除# The purpose of this script to convert the xlsx and xls suffixes into csv suffixed files while deleting the original filesimport osimport pandas as pdsrc = '/opt/tool/python3/reptile'dst = '/opt/tool/pytho原创 2020-12-24 16:36:42 · 420 阅读 · 1 评论 -
【Python爬虫】爬取博主博客标题
请求库:requests解析库:lxml目的:爬取某位CSDN博主的文章标题import requestsfrom lxml import etreeurl = "https://yetingyun.blog.csdn.net/article/list/1"headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/8原创 2020-12-23 14:08:18 · 663 阅读 · 7 评论