随笔分类 -  pandas

摘要:dbconn=pymysql.connect( host="rm-.mysql.rds.aliyuncs.com", database="nde", user="linr", password="deai$", port=3306, charset='utf8' ) uids = ['eTRxekV 阅读全文
posted @ 2021-08-05 14:35 pythoner_wl 阅读(907) 评论(0) 推荐(0) 编辑
摘要:import xlwt import pandas as pd class Excel_style: """excel表格样式类""" def __init__(self, font_heigh): self.font_heigh = font_heigh # 字体大小:磅 @property de 阅读全文
posted @ 2021-08-05 14:01 pythoner_wl 阅读(1456) 评论(0) 推荐(0) 编辑
摘要:Pandas处理以下三个数据结构 ,这些数据结构构建在Numpy数组之上,这意味着它们很快。 系列(Series) 数据帧(DataFrame) 面板(Panel) 较高维数据结构是其较低维数据结构的容器。 DataFrame是Series的容器,Panel是DataFrame的容器。 数据结构 维 阅读全文
posted @ 2021-03-11 10:02 pythoner_wl 阅读(103) 评论(0) 推荐(0) 编辑
摘要:sql_module_base = f""" SELECT COUNT(distinct id,date_format(creat_time, '%Y-%m_%d %H:%M')) as count, shift, MIN( creat_time ) as creat_time, YEAR ( cr 阅读全文
posted @ 2021-02-09 15:57 pythoner_wl 阅读(47) 评论(0) 推荐(0) 编辑
摘要:f = pd.read_sql(con=conn, sql=sql) df1 = f.iloc[:1000000, :] df2 = f.iloc[1000000:2000000, :] df3 = f.iloc[2000000:3000000, :] df4 = f.iloc[3000000:40 阅读全文
posted @ 2021-02-04 10:28 pythoner_wl 阅读(178) 评论(0) 推荐(0) 编辑
摘要:df.loc[1, '地址(断网)'] = '=HYPERLINK("#Sheet2!B2","单元格的名字")' # 超链接写入单元格 问题:打开excel单元格是文本,需要点击公式框,然后才可以变成连接, 解决:用xlwt模块,无问题 import xlwt book = xlwt.Workbo 阅读全文
posted @ 2021-02-02 17:47 pythoner_wl 阅读(530) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示