【发布时间】:2020-09-24 16:15:29
【问题描述】:
我确实有一个 Word 文档,我想对其进行编辑。这是文件的一部分。 【Word文档部分】:https://i.stack.imgur.com/g5JGO.jpg
我可以使用 python-docx 将它上传到 jupyter notebook。
我可以通过
访问每一行import docx
doc = docx.Document('StudentReport.docx')
len(doc.paragraphs)
output- 31
print(doc.paragraphs[7].text)
output- 98% of Student have some access
所以我只想将 98% 更改为 85%。
【问题讨论】:
-
你的问题不清楚。请添加您编写的代码并更好地解释所需的输出
-
我编辑问题。我只是想知道,这些行如何编辑并将它们放在同一个地方?
标签: python-3.x pandas docx python-docx doc