Stop clicking. Start automating.

A hands-on guide that takes you from zero Python to automating real accounting workflows. Built around eight accounting datasets and the tools professionals actually use.

Python for Accounting front cover.
Read chapter 1 free — we'll email it instantly.
Ready to buy? Jump to pricing.

What you'll build

By the end of the book, you'll be running real accounting work in Python — not toy exercises. Here's a taste.

Clean messy SAP exports in minutes

Drop the point-and-click dance. A few lines of pandas turn a raw export into the shape you actually need.

import pandas as pd

ledger = pd.read_excel("sap_export.xlsx")
ledger = (ledger
    .dropna(subset=["Account"])
    .assign(Amount=lambda df: df["Amount"].abs())
    .query("Status == 'Posted'"))
ledger.to_excel("clean_ledger.xlsx", index=False)

Automate month-end workbook compilation

Stitch dozens of sheets into one reconciled workbook — the same way, every month, without a single copy-paste.

from pathlib import Path
import pandas as pd

files = Path("month_end").glob("*.xlsx")
books = [pd.read_excel(f) for f in files]
combined = pd.concat(books, ignore_index=True)
combined.to_excel("month_end_consolidated.xlsx")

Work with files Excel can't even open

Excel caps out at ~1M rows. Python is limited by your machine, not by a spreadsheet format from 2007.

import pandas as pd

txns = pd.read_csv("transactions_5M_rows.csv")
by_region = (txns
    .groupby("region")["amount"]
    .sum()
    .sort_values(ascending=False))
print(by_region.head())

Build charts that update themselves

Describe the chart you want once in code. Re-run it against new data and get the same perfectly-styled plot.

import pandas as pd
import matplotlib.pyplot as plt

cash_flow = pd.read_excel("cash_flow.xlsx")
cash_flow.plot.bar(x="month", y="net", color="#4F46E5")
plt.title("Monthly net cash flow")
plt.tight_layout()
plt.savefig("cash_flow.png", dpi=200)
Photo of Alec.
I recently landed an awesome role at an accounting consulting firm. A big reason why I landed it was because I knew Python, which I learned from your book! Thanks for creating such a valuable resource, it was tremendously helpful.

What's inside

The 395-page book, 8 real accounting datasets, an interactive notebook for every chapter, a one-click remote workspace, and a private Discord.

The Book

A hands-on guide to Python and its data science tools focused on accounting tasks and data, spread across 300+ pages.

The book takes you on a four-part journey:

  1. Part One: Python ABCs introduces the building blocks of the Python programming language. If you've never seen code before, this part of the book will show you how to define variables and functions in Python, how to work with lists and loops, and more.
  2. Part Two: Working with Tables is where the rubber meets the road in using Python for accounting. This part of the book shows you how to use the pandas Python library to handle Excel spreadsheets.
  3. Part Three: Visualizing Data shows you how to turn data from Excel tables into perfectly crafted plots using Python code.
  4. Part Four: Sales Analysis Project takes you through an end-to-end management accounting project. You'll analyze sales and profitability with Python, pandas, and a few other Python libraries.

The book contains everything you need to know about using Python programming in accounting, distilled into short, easy to read chapters.

See for yourself — follow us to read the first chapter:

Convinced? Get your copy now.

The Projects & Data

Most Python tutorials are too vague for accounting. They go over the basics, but don't show you how Python makes handling real Excel spreadsheets easy.

Python for Accounting teaches you how to use Python to work with real-world accounting tables that look like this:

Image of accounting data you will be using in the book.

We'll walk you through five quick data handling projects:

  1. Filtering and splitting a large Excel file into multiple sheets
  2. Reading and cleaning a QuickBooks general ledger
  3. Mining product reviews to discover what people like and dislike about their purchases
  4. Filling missing values in an Excel spreadsheet using data from another file
  5. Turning a cash flow statement into a waterfall plot

You'll learn how to use Python and automate the repetitive parts of your accounting job today.

The Workspace

Getting set up with the software you need to write and run Python on your computer is often the hardest part of learning how to code.

That's why you get access to a remote workspace that has Python installed, and is already set up with all the datasets and code files you'll need to go through the book. All in one click.

Get Python for Accounting now

Choose the package that's right for you.

The Complete Guide

Launch price — save $70
$199$129USD
Regular price $199 after launch
  • The 395-page book in PDF format
  • All 8 accounting datasets you'll use throughout the book
  • An interactive coding notebook for each chapter that you can use to learn Python fast
  • One-click access to the Python for Accounting remote workspace
  • Access to the Python for Accounting Discord channel, a group where you can ask us questions and learn Python with other readers
  • All updates to the first edition of the book
Buy now
30-day money-back guarantee
Powered by Gumroad

Buying for your team? View team pricing options.

The Essential GUIDE

Launch price — save $30
$79$49USD
  • The 395-page book in PDF format
  • All 8 accounting datasets you'll use throughout the book
  • An interactive coding notebook for each chapter that you can use to learn Python fast
Buy now
30-day money-back
Powered by Gumroad

Who we are

Photo of Horatio.
Horatio Bota
Data Scientist

Over seven years of experience in data analytics and data science. Previously at Microsoft, J.P. Morgan Chase, and several UK startups.

University of Glasgow · PhDMicrosoftJ.P. Morgan
Photo of Adrian.
Adrian Gosa
Senior Accountant

Over seven years of business and finance experience. M.A. in Business Economics and M.Sc. in Quantitative Finance.

University of GlasgowPwCDeloitteNike

Frequently Asked Questions

What do I need to know before starting?

No Python or general coding knowledge required. You'll get the most out of the book if you've used Excel in your day-to-day work and know what a pivot table is and how to use basic functions like SUM or LEN. If you've been using Excel for a while, you're good to go.

What if it's not for me?

No problem. Email us at support@pythonforaccounting.com within 30 days and we'll refund you in full — no questions asked.

What format is the book in? Is there any DRM?

You get the book as a PDF file. No DRM.

Can I upgrade to the complete guide later?

Any time. Send us an email at support@pythonforaccounting.com and we'll get you sorted.

Can I get Python for Accounting for my entire team?
Can I get an invoice?

Of course. Click the "Generate" button on your receipt from Gumroad after you purchase and you can generate a detailed invoice with any additional information you need.

Can I get a physical copy?

We're planning on printing a physical version later this year, but right now everything is only available digitally.

Do you offer in-person workshops?

Sure. We offer live or online workshops for up to 100 participants.

If you're interested in a workshop for your team, send us an email at workshops@pythonforaccounting.com.

$79$49
Get the book