Automating a boring (data) task in my life -with python

I eagerly resumed my role as a fresh graduate at a data center in Nigeria, where I was to work for a whole year as part of the country’s mandatory youth service program, following university graduation. I quickly realized that I would be joining the monthly client reporting team, responsible for sifting through numerous Excel sheets to extract data for each client and then compiling this information into PowerPoint slides to be sent out.

The problem with this is that we had to do this for over 90 clients every single month! With just a team of four, it amounted to a significant amount of recurring work. As someone passionate about enhancing job quality and ensuring both myself and my colleagues could enjoy our work while maximizing productivity, I knew action was necessary, So, I began contemplating solutions.

My research led me to explore how Python could interact with PowerPoint, and I discovered the python-pptx module, which became the foundation of my work. Preparing the data — removing leading and trailing spaces, ensuring uniformity in case, grouping, and aggregation — was relatively straightforward for me due to my extensive background in data science. However, I had to conduct numerous experiments in my Jupyter Notebook to understand to what element changes what portion of the presentation slides.

Once that was done, to minimize the need for much ground work in my code; I devised a presentation template containing all possible variants of the slides. Depending on the relevance for each client, I included code segments to either include or exclude specific slides from the template and populate the required data. To initialize the slides, I employed object-oriented programming to generate, populate, and save each slide, abstracting away most of the complex code.

The logic behind the system was simple: a directory would hold all the input data required to create these PowerPoint presentations, while another directory would store all the generated presentations. Both paths, along with the month and year under consideration, were supplied to my program. Additionally, an optional argument allowed for the selection of a subset of clients if reports for all clients were not needed.

After a month of development, I had a functional codebase in my Jupyter Notebook, which I subsequently modularized and saved into different Python files. I then utilized Streamlit to create a user-friendly front end for interacting with my code which is shown below.

streamlit frontend for my code


Now, when the month ends, the team can relax while I simply press the “generate report” button, automating much of the tedious work.

Oreoluwa Isadare

Data Enthusiast||Finance Enthusiast||AAT||ACA(in view)

10 个月

This is awesome! Inspires me to find creative solutions??

Precious Triumphant

Agriculture || Leadership Commitment to Transforming Agribusiness and Feeding Nations

10 个月

This is so amazing

Progress Olaoye

Product Management | DevOps | Solving Problems

10 个月

????smart work!

Feranmi Oyedare

Mechanical Engineer|| Data Scientist || Python || AI Researcher

10 个月

This is really great Blessing!

Oyindamola Victor

Data Engineer || 2x Google Cloud Certified Professional || AWS Cloud Certified Data Engineer || Andela Talent || Python || SQL & NoSQL || Airflow || ETL || Data Warehouse || dbt || Data Modelling || Community Builder

10 个月

Amazing...Well done Wunmi ??

要查看或添加评论,请登录

Blessing Oludele的更多文章

社区洞察

其他会员也浏览了