Cheat Sheet of Python for Finance and FP&A: 5 Easy Ways to use Python

Python is a powerful programming language that can be used in Financial Planning and Analysis (FP&A) to automate various tasks and streamline workflows.

Cheat Sheet of Python for Finance and FP&A by Christian Martinez, Founder of The Financial Fox

Here is a cheat sheet of Python for FP&A with the code.

And remember, you DO NOT need to install Python on your computer. You can just use Google Colab (think Google Docs but for Programming) and run Python on your favorite browser!

1. Creation of PowerPoint Slides from Excel

Python provides several libraries such as pywin32, python-pptx, and pptx2pdf to create PowerPoint presentations from Excel data. Here are the basic steps:

  1. Import the necessary libraries.
  2. Read the Excel data using the pandas library.
  3. Create a PowerPoint presentation using the python-pptx library.
  4. Add slides and charts to the presentation.
  5. Save the presentation using the pptx library.
import pandas as pd
from pptx import Presentation
from pptx.util import Inches

# read Excel data
df =…

--

--

Christian Martinez Founder of The Financial Fox

Finance Transformation Senior Manager @ Kraft Heinz | Founder of The Financial Fox