Python for Accountants: Where to Start and What to Automate
Python is a free programming language that is well suited to repetitive finance work: combining files, cleaning data, matching transactions and producing reports. You do not need to become a software developer. Learn a small slice (reading files, filtering, grouping, writing results), apply it to one task that wastes time every month, and expand from there. If a task in Excel takes you more than 30 minutes every month and follows the same steps, it is a candidate.
Why would an accountant use Python at all?
Excel is excellent and Python does not replace it. The difference shows up when work becomes repetitive or large. A script runs the same steps every time, so the result is the same, and you can keep the script as a record of exactly what was done. It handles files too big for a spreadsheet, and it can combine dozens of workbooks without anyone opening them.
It also fits the direction of the profession. As more finance work goes into software, as covered in our post on digital transformation for a small business, the person who can shape data has an advantage over the person who retypes it.
What should you learn first?
- Install Python and a simple editor. A notebook environment lets you run code step by step and see the result.
- Learn pandas. This is the library for tables of data. It reads Excel and CSV files into a table that looks like a worksheet.
- Learn five operations: read a file, filter rows, add a calculated column, group and total, write the result back to Excel.
- Learn to join two tables. This is the equivalent of a lookup and it unlocks reconciliations.
- Use an AI assistant as a tutor. ChatGPT or Microsoft Copilot can explain an error message or suggest a line of code. Always run the code on a copy of the data and check the answer against a total you already know.
Skip everything else for the first month: web scraping, machine learning and apps can wait.
Which tasks are worth automating first?
- Combining monthly bank statement exports from several accounts into one file.
- Splitting one large client list into one workbook per client.
- Matching bank lines to ledger entries by amount and date.
- Checking a list for duplicates or missing VAT numbers.
- Producing the same monthly summary table for several clients.
Choose tasks where the inputs are consistent and the output can be checked. Do not start with a task where judgment changes every time.
Worked example: merging bank files for a Limerick practice
Niamh works in a small Limerick bookkeeping practice. Every month she receives bank exports from 12 clients, each with different column names (Date, Transaction Date, Details, Description). She spends about 15 minutes per client tidying them before importing to the bookkeeping software.
- She writes a script that reads each file and renames the columns to one standard set: date, description, amount.
- It converts dates to one format and turns amounts into numbers, removing any currency symbols.
- It adds the client name as a column and writes one clean file per client.
- It prints a check: the number of rows in and out, and the total of the amount column for each client.
Her time arithmetic: 12 clients x 15 minutes = 180 minutes (3 hours) a month by hand. After the script, the run takes a minute or two and she spends about 5 minutes per client checking the totals: 12 x 5 = 60 minutes. The first build takes her a few evenings, but it pays back within two or three months. The check totals are what make it safe: if the rows or totals do not match, she stops and looks.
How do you keep it safe and professional?
- Protect client data. Do not paste real client data into a public AI tool. Use dummy data when you ask for help, and read our guide to GDPR for small businesses.
- Keep the original files untouched. Always write results to a new file.
- Reconcile every run. Compare totals before and after.
- Document the script. Write at the top what it does, who wrote it and the date, so a colleague can take it over.
- Back up the scripts. Store them in a shared, backed-up folder.
If you are weighing where to spend time, compare Python with your options in automating your bookkeeping: for standard tasks, built-in bank feeds and rules often beat a script.
Python or Excel: which should you use?
Use Excel when the data is small, the task is one-off, or the client needs to see and edit the formulas. Use Python when the task repeats, the files are many or large, or you need an audit trail of the exact steps. Many practices use both: Python prepares the data and Excel presents it.
In short
- Start with pandas and five operations, not the whole language.
- Pick a repeated monthly task with consistent inputs.
- Reconcile totals on every run and never use real client data in public AI tools.
The Strategic Management programme looks at how to decide which processes to change and how to lead the change, so the time you save is spent on higher-value work.
Questions people ask
- Do accountants need to learn Python?
- No, it is not required. It helps with repetitive, large or multi-file tasks such as combining bank exports, matching transactions and producing the same report for many clients. Excel remains the right tool for small, one-off work.
- What should an accountant learn first in Python?
- Start with pandas, the library for tables of data. Learn to read a file, filter rows, add a calculated column, group and total, and write the result back to Excel. That covers most early finance tasks.
- Is it safe to use ChatGPT to write Python for client data?
- It is safe to ask for help with code if you use dummy data. Do not paste real client details or financial records into a public AI tool, because that may breach data protection duties and your client confidentiality.
- What is the best first task to automate with Python?
- Choose a task you repeat every month with the same steps and consistent files, for example combining bank exports. Make sure you can check the output against a known total before you rely on it.