摘要:seaborn学习笔记 参考:https://seaborn.pydata.org/tutorial.html 官网:http://seaborn.pydata.org/ github: https://github.com/mwaskom/seaborn-data 1. 导入示例数据方法 参考:h
阅读全文
摘要:Table API 参考:https://python-docx.readthedocs.io/en/latest/api/table.html 1. Table对象 #1.创建table document.add_table() #2.在右侧新增列 add_column(width) #3.在底部
阅读全文
摘要:Text API Paragraph API 参考:https://python-docx.readthedocs.io/en/latest/api/text.html #1.添加文本块 #text中可以包括特殊符号 #tab:/t; #newline:/n; #return:/r; add_run
阅读全文
摘要:Document API 参考:https://python-docx.readthedocs.io/en/latest/api/document.html #1.构造函数,返回Document对象 document = Document(docx=None) #2.添加标题 add_heading
阅读全文
摘要:header 访问header #1.访问header header = section.header #2.设置是否同上一节相同 header.is_linked_to_previous=True #3.新增header,此时is_linked_to_previous属性自动改为False par
阅读全文
摘要:Sections section的访问和添加 #1.访问全文所有sections,得到结果列表 sections = document.sections #2.添加section #之后添加的段落和内容都会位于该section中 new_section = document.add_section(
阅读全文
摘要:character formatting 设置字体样式和大小,加粗,倾斜,下划线 font = run.font font.name = 'Calibri' font.size = Pt(12) font.italic = True font.bold = True #下划线 font.underl
阅读全文
摘要:paragraph学习笔记 修改段落格式属性 修改段落格式使用段落的paragraph_format属性,会生成一个 ParagraphFormat对象 设置段落对齐方式 document = Document() p = document.add_paragraph() pFormat = p.p
阅读全文
摘要:python-docx学习笔记 1.参考:https://blog.csdn.net/qq_40985985/article/details/120058382 2.官方文档:https://python-docx.readthedocs.io/en/latest/user/text.html
阅读全文
摘要:需求分解 使用wind 提供的python API接口查询某支股票的收盘价 使用matplotlib对收盘价进行图形展示 利用python word相关包生成word格式报告 part1:使用使用wind 提供的python API接口查询某支股票的收盘价 w.start() #使用wsd函数获取时
阅读全文
摘要:柱形图 参考:http://c.biancheng.net/matplotlib/bar.html 直方图 参考:http://c.biancheng.net/matplotlib/histogram.html 饼图 参考:http://c.biancheng.net/matplotlib/pie.
阅读全文
摘要:设置网格grid grid(color='b', ls = '-.', lw = 0.25) - color:表示网格线的颜色; - ls:表示网格线的样式; - lw:表示网格线的宽度; #如果您只是想开启不带任何样式的网格,可以通过 grid(True) 来实现。 import matplotl
阅读全文
摘要:subplot 基本用法 plt.subplot(nrows, ncols, index) #nrows 与 ncols 表示要划分几行几列的子区域(nrows*nclos表示子图数量) #index 的初始值为1,用来选定具体的某个子区域 #如果新建的子图与现有的子图重叠,那么重叠部分的子图将会被
阅读全文
摘要:PyLab用法举例 参考:http://c.biancheng.net/matplotlib/pylab-module.html #同时绘制多个图形 from pylab import * import numpy as np x = np.linspace(-3,3,30) plot(x,np.s
阅读全文
摘要:pyplot API汇总 参考:http://c.biancheng.net/matplotlib/pyplot-api.html pyplot jupyter notebook中图像行内显示:%matplotlib inline 第一个例子 import numpy as np import pa
阅读全文
摘要:matplotlib学习笔记 参考教程:http://c.biancheng.net/matplotlib/ 1.安装 pip install matplotlib 2.matplotlib扩展包(可能需要单独安装) Bashmap:这是一个地图绘制工具包,其中包含多个地图投影,海岸线和国界线; C
阅读全文
摘要:Python操作excel笔记 参考:https://mp.weixin.qq.com/s/vzJ264VZeswXRuzM6a-hgA xlwings 新建工作簿 app=xw.App(visible=True,add_book=False) wb=app.books.add() wb.save(
阅读全文
摘要:Requests模块 会话对象的使用 requests.Session() 参考:https://wenku.baidu.com/view/1cad4d27cf1755270722192e453610661ed95a25.html BeautifulSoup模块 xpath教程 参考:https:/
阅读全文
摘要:PyQt的安装 参考:https://www.cnblogs.com/ldym/p/16031455.html 将.ui文件编译成.py文件 参考1:https://blog.csdn.net/stormdony/article/details/80400032 参考2:https://blog.c
阅读全文
摘要:需求背景:平时工作中要定期出具格式固定的运营报告,使用Python+Pandas+docxtpl编制了报告程序,但是对于不会编程的同事而言,使用终端运行程序,界面不太友好,鉴于此希望构建一个UI窗口来辅助同事使用。 用到的工具:Python的GUI构建包WxPyhton 步骤一:借助wxPython
阅读全文