- 博客(8)
- 资源 (6)
- 收藏
- 关注
原创 python中如何把xlsx、xls文件转换为txt文件?安排
# _*_ coding: utf-8 _*_"""Time: 2021/12/30 16:45Author: [email protected]: V1.0File: change2txt.pyDescribe: xls文件转换成txt"""import pandas as pddef change2txt(excel_name,sheet_name,txt_name,sep): df = pd.read_excel(excel_n.
2021-12-31 09:56:34 1963
原创 xlrd读取Excel数据
import xlrdxls = 'bug.xls'sheet =xlrd.open_workbook(xls).sheets()[0]#获取bug总数bug_num = sheet.nrows-1#获取bug提交人sub = sheet.col_values(20)#bug提交人去重复bug_submit = [str(i) for i in set(sub[1:])]#获取bug严重等级levels = [int(p) for p in sheet.col_values(8).
2021-12-29 17:00:42 2932
原创 pyecharts绘制圆饼和柱状图,安排
# _*_ coding: utf-8 _*_"""Time: 2021/12/29 12:45Author: [email protected]: V1.0File: draw.pyDescribe: 绘制圆饼图和柱状图"""from pyecharts import Bar #导入柱状图from pyecharts import Pie #导入饼图class Draw(): def __init__(self): .
2021-12-29 16:28:20 546
原创 在python中使用scp与远程服务器进行数据交换,安排
# _*_ coding: utf-8 _*_"""Time: 2021/6/15 14:45Author: [email protected]: V1.0File: scp_log.pyDescribe: 获取远程服务器日志文件并存在目录web_log中: 1) 确保本地主机网络跟远程主机目录网络都是内网 2)日志非实时刷新,每次获取日志需要重新执行当前脚本"""import paramiko.
2021-12-29 10:09:19 641
原创 python操作mysql,安排
import pymysqlclass MySql(): def __init__(self): # 连接数据库 self.db = pymysql.connect(host='124.70.137.18', port=3306, user='root', password='chc1qa.
2021-12-29 10:03:39 447
原创 如何用python写一个天气预报小程序,安排
"""Time: 2021/6/15 14:45Author: [email protected]: V1.0File: get_weather.pyDescribe: 获取城市天气情况: 1)确保输入存在的城市或县市 """import requestsimport timefrom lxml import htmlfrom xpinyin import Pinyinclass Weather.
2021-12-29 09:57:33 1240
原创 使用python读取sql并存入Excel,安排
* coding: utf-8 *"""Time: 2021/12/2812:45Author: [email protected]: V1.0File: writeSQL2excel.pyDescribe: 把查询的sql结果写到Excel中"""import pymysql, xlwtclass Mysql(): def __init__(self): # 连接数据库 self.db = pymysql
2021-12-29 09:44:53 1547
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人