Subsurface Syntax

Subsurface Syntax

Streamlit Tutorial: Creating Word Reports for Data Science Projects

Combining python-docx and Streamlit for Data Science Report Automation

Andy McDonald's avatar
Andy McDonald
Apr 17, 2023
∙ Paid

Combining python-docx and Streamlit for Data Science Report Automation

Report image generated by the author using Midjourney Basic Plan.

At the end of data-related projects, whether for petrophysics or data science, creating a report is a very common occurrence. The generated reports provide clients and end users with information on the key results and conclusions obtained during the study, as well as detailing the methodologies used.

However, creating structured reports can be a tedious and time-consuming process, especially when it comes to ensuring they are formatted correctly and the data is presented in the best way possible.

This article will show how we can use the popular Streamlit library, combined with python-docx, to create the first step in automating part of the reporting process.

The python-docx library will allow us to create a Microsoft Word report. Having the report in the format will allow us to make edits and apply finishing touches before making it into a PDF.

Even thoug…

Keep reading with a 7-day free trial

Subscribe to Subsurface Syntax to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2026 Andy McDonald · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture