python docx学习笔记 Sections

摘要: Sections section的访问和添加 #1.访问全文所有sections,得到结果列表 sections = document.sections #2.添加section #之后添加的段落和内容都会位于该section中 new_section = document.add_section( 阅读全文
posted @ 2022-05-23 17:00 朝朝暮Mu 阅读(519) 评论(0) 推荐(0)

python docx学习笔记 设置字体格式 character formatting

摘要: character formatting 设置字体样式和大小,加粗,倾斜,下划线 font = run.font font.name = 'Calibri' font.size = Pt(12) font.italic = True font.bold = True #下划线 font.underl 阅读全文
posted @ 2022-05-23 16:46 朝朝暮Mu 阅读(190) 评论(0) 推荐(0)

python docx 学习笔记 paragraph

摘要: paragraph学习笔记 修改段落格式属性 修改段落格式使用段落的paragraph_format属性,会生成一个 ParagraphFormat对象 设置段落对齐方式 document = Document() p = document.add_paragraph() pFormat = p.p 阅读全文
posted @ 2022-05-23 16:30 朝朝暮Mu 阅读(726) 评论(0) 推荐(0)

python-docx学习笔记

摘要: python-docx学习笔记 1.参考:https://blog.csdn.net/qq_40985985/article/details/120058382 2.官方文档:https://python-docx.readthedocs.io/en/latest/user/text.html 阅读全文
posted @ 2022-05-23 09:55 朝朝暮Mu 阅读(30) 评论(0) 推荐(0)

使用wind API查询某股票股价

摘要: 需求分解 使用wind 提供的python API接口查询某支股票的收盘价 使用matplotlib对收盘价进行图形展示 利用python word相关包生成word格式报告 part1:使用使用wind 提供的python API接口查询某支股票的收盘价 w.start() #使用wsd函数获取时 阅读全文
posted @ 2022-05-21 14:40 朝朝暮Mu 阅读(1292) 评论(0) 推荐(0)

matplotlib学习笔记_各种图形

摘要: 柱形图 参考:http://c.biancheng.net/matplotlib/bar.html 直方图 参考:http://c.biancheng.net/matplotlib/histogram.html 饼图 参考:http://c.biancheng.net/matplotlib/pie. 阅读全文
posted @ 2022-05-21 11:27 朝朝暮Mu 阅读(38) 评论(0) 推荐(0)

matplotlib学习笔记_其他设置

摘要: 设置网格grid grid(color='b', ls = '-.', lw = 0.25) - color:表示网格线的颜色; - ls:表示网格线的样式; - lw:表示网格线的宽度; #如果您只是想开启不带任何样式的网格,可以通过 grid(True) 来实现。 import matplotl 阅读全文
posted @ 2022-05-21 10:35 朝朝暮Mu 阅读(175) 评论(0) 推荐(0)

matplotlib学习笔记_subplot

摘要: subplot 基本用法 plt.subplot(nrows, ncols, index) #nrows 与 ncols 表示要划分几行几列的子区域(nrows*nclos表示子图数量) #index 的初始值为1,用来选定具体的某个子区域 #如果新建的子图与现有的子图重叠,那么重叠部分的子图将会被 阅读全文
posted @ 2022-05-20 19:26 朝朝暮Mu 阅读(93) 评论(0) 推荐(0)

matplotlib学习笔记_figure

摘要: 1.生成figure对象 import matplotlib.pyplot as plt fig = plt.figure() #添加绘图区域axes区域 ax = fig.add_axes([left,bottom,width,height]) #括号中的四个参数分别是百分比的形式,标识相对于fi 阅读全文
posted @ 2022-05-20 17:10 朝朝暮Mu 阅读(70) 评论(0) 推荐(0)

matplotlib学习笔记_PyLab

摘要: 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 阅读全文
posted @ 2022-05-20 16:44 朝朝暮Mu 阅读(25) 评论(0) 推荐(0)