摘要: #1、写入方式 xlsxwriter'''这里excel 限制列数为256,大于256列的数据不能够写入excel表格这个问题我之前遇到过两次,但一直没有找到解决的方案,今天,我发现了一种解决方法 -- xlsxwriter但是,这个也有缺点!!那就是,xlsxwriter不支持带格式的文件impo 阅读全文
posted @ 2020-02-21 21:08 悠悠的奶茶 阅读(267) 评论(0) 推荐(0)
摘要: import zmailserver = zmail.server('xxxx@qq.com','授权码')mail = server.get_latest()# zmail.show(mail)print(mail['subject'])# print(mail['id'])# print(mai 阅读全文
posted @ 2020-02-21 21:06 悠悠的奶茶 阅读(244) 评论(0) 推荐(0)
摘要: import smtplibfrom smtplib import SMTP_SSLfrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartfrom email.header import H 阅读全文
posted @ 2020-02-21 21:04 悠悠的奶茶 阅读(258) 评论(0) 推荐(0)
摘要: import smtplibfrom smtplib import SMTP_SSLfrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartfrom email.header import H 阅读全文
posted @ 2020-02-21 21:02 悠悠的奶茶 阅读(2890) 评论(0) 推荐(0)
摘要: import smtplibfrom smtplib import SMTP_SSLfrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartfrom email.header import H 阅读全文
posted @ 2020-02-21 20:59 悠悠的奶茶 阅读(176) 评论(0) 推荐(0)
摘要: import pandas as pd import numpy as npe_file = pd.ExcelFile(r'C:/Users/13375/Desktop/python/成绩表.xlsx')data = e_file.parse('2020年成绩单')# print(data)# pr 阅读全文
posted @ 2020-02-21 20:55 悠悠的奶茶 阅读(442) 评论(0) 推荐(0)
摘要: import osimport xlwtfile_dir =(r'C:\Users\13375\Documents\百度云同步盘\电脑自动动同步\会议\ISO会议20180703') os.listdir(file_dir)new_workbook = xlwt.Workbook()workshee 阅读全文
posted @ 2020-02-21 20:54 悠悠的奶茶 阅读(490) 评论(0) 推荐(0)
摘要: from docx import Documentimport xlrddef change_text(old_text,new_text): all_paragraphs = document.paragraphs for paragraph in all_paragraphs: for run 阅读全文
posted @ 2020-02-21 20:48 悠悠的奶茶 阅读(636) 评论(0) 推荐(0)
摘要: # 适合比较长的模板,并且保留原格式from docx import Documentfrom docx.shared import Ptfrom docx.oxml.ns import qndocument = Document(r'C:/Users/13375/Desktop/python/长恨 阅读全文
posted @ 2020-02-21 20:46 悠悠的奶茶 阅读(300) 评论(0) 推荐(0)
摘要: from pptx import Presentationppt = Presentation(r'C:/Users/13375/Desktop/python/model.pptx')shape = ppt.slides[0].shapes# for i in shape:# print(i.tex 阅读全文
posted @ 2020-02-21 20:44 悠悠的奶茶 阅读(244) 评论(0) 推荐(0)
摘要: # 导入库from pptx import Presentationfrom pptx.util import Inchesppt = Presentation() #新建幻灯片slide = ppt.slides.add_slide(ppt.slide_layouts[1]) #插入新的幻灯片页面 阅读全文
posted @ 2020-02-21 20:42 悠悠的奶茶 阅读(1009) 评论(0) 推荐(0)
摘要: from io import StringIOfrom pdfminer.pdfinterp import PDFResourceManager,process_pdffrom pdfminer.converter import TextConverterfrom pdfminer.layout i 阅读全文
posted @ 2020-02-21 20:40 悠悠的奶茶 阅读(832) 评论(0) 推荐(0)
摘要: # 简单的模板套用-适用于少量的改变from docx import Documentfrom docx.enum.text import WD_ALIGN_PARAGRAPHfrom docx.shared import Ptfrom docx.oxml.ns import qndog_list 阅读全文
posted @ 2020-02-21 20:38 悠悠的奶茶 阅读(275) 评论(0) 推荐(0)
摘要: from win32com.client import Dispatch,constants,gencachedocx_path = (r'C:/Users/13375/Desktop/python/长恨歌.docx')pdf_path = (r'C:/Users/13375/Desktop/pyt 阅读全文
posted @ 2020-02-21 20:36 悠悠的奶茶 阅读(288) 评论(0) 推荐(0)
摘要: from docx import Document# 读取全文本# document = Document(r'C:\Users\13375\Desktop\python\长恨歌.docx')# all_paragraphs = document.paragraphs# for paragraph 阅读全文
posted @ 2020-02-21 20:32 悠悠的奶茶 阅读(2295) 评论(0) 推荐(0)
摘要: from pptx import Presentationfrom pptx.util import Inches,Ptppt = Presentation()slide = ppt.slides.add_slide(ppt.slide_layouts[1]) #在ppt中插入一个幻灯片页body_ 阅读全文
posted @ 2020-02-21 20:29 悠悠的奶茶 阅读(319) 评论(0) 推荐(0)
摘要: import pandas as pd# a = pd.Series(['a','b','c','d'])# print(a)# b = pd.DataFrame({'NAME':['tom','wendy','dancy'],# 'GENDER':['MALE','FEMALE','FEMALE' 阅读全文
posted @ 2020-02-21 20:27 悠悠的奶茶 阅读(340) 评论(0) 推荐(0)
摘要: import pandas as pd import numpy as npimport matplotlib.pyplot as plte_file = pd.ExcelFile(r'C:/Users/13375/Desktop/python/成绩表.xlsx')data = e_file.par 阅读全文
posted @ 2020-02-21 20:23 悠悠的奶茶 阅读(526) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as pltplt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签data = ['2020/2/1','2020/2/2','2020/2/3','2020/2/4','2020/2/5' 阅读全文
posted @ 2020-02-21 20:21 悠悠的奶茶 阅读(263) 评论(0) 推荐(0)
摘要: import xlrdfrom bs4 import BeautifulSoupimport requestsimport timeimport xlsxwriter as wximport win32com.clientxlsx = xlrd.open_workbook(r'C:\Users\13 阅读全文
posted @ 2020-02-21 20:19 悠悠的奶茶 阅读(333) 评论(0) 推荐(0)
摘要: from openpyxl import Workbookfrom openpyxl.utils import get_column_letterfrom openpyxl.styles import PatternFill,Colorfrom PIL import Imageworkbook = 阅读全文
posted @ 2020-02-21 20:17 悠悠的奶茶 阅读(359) 评论(0) 推荐(0)
摘要: from docx import Documentfrom docx.enum.text import WD_ALIGN_PARAGRAPHfrom docx.shared import Pt #磅数from docx.oxml.ns import qn #中文格式import timeprice 阅读全文
posted @ 2020-02-21 20:15 悠悠的奶茶 阅读(431) 评论(0) 推荐(0)
摘要: from docx import Documentfrom docx.enum.text import WD_ALIGN_PARAGRAPHfrom docx.shared import Pt #磅数from docx.oxml.ns import qn #中文格式from docx.shared 阅读全文
posted @ 2020-02-21 20:13 悠悠的奶茶 阅读(947) 评论(0) 推荐(0)