---
title: "Transaction Categorizer Python Script | MCC Solutions"
description: "A Python script that learns your categories from past books and suggests categories for new bank lines, with confidence and a review queue."
url: "https://mcc-solutionsnj.com/bookkeeping/transaction-categorizer-python-script"
---

Paid script

# Transaction Categorizer Python script

Teach it from last year's categorized transactions, then hand it this month's bank export. It suggests a category for every line and tells you how sure it is.

[![Intuit ProAdvisor Gold tier badge](/img/credentials/intuit-proadvisor-gold.png)](https://proadvisor.intuit.com/app/accountant/search?searchId=matthew-coleman77)Gold tier in Intuit's ProAdvisor program. [See my Intuit listing](https://proadvisor.intuit.com/app/accountant/search?searchId=matthew-coleman77)

Paid script

## Transaction Categorizer Python script

Buy this script on its own for $19, one time. No membership needed. It runs on your own computer and nothing you enter leaves it. Read how it works and the questions below first.

The [Financial Suite](/bookkeeping/financial-suite) includes this and 9 more tools for $49. Members get this included. [See the membership](/membership) or [sign in](/membership/login). Already bought it? Email me my access link.

How it works

## How it works

The script trains a **Naive Bayes model** on the descriptions and amount sizes in your own history, remembers vendors you always book the same way, and lets you add your own override rules. Every suggestion comes with a confidence and the next-best categories, and lines under your confidence setting go to a review queue instead of being guessed. A cross-validation mode measures how well it does on your own books before you trust it. Pure Python, no installs, and nothing leaves your computer.

FAQ

## About this calculator

**How much history does it need?**

A few hundred categorized lines covering your usual vendors works well. More history helps, and unfamiliar vendors are flagged for review rather than guessed.

**How accurate is it?**

It depends on how consistent your past categorizing is. The built-in cross-validation reports the accuracy on your own history so you can see before you rely on it. Always review the flagged lines.

**Does it post anything to my accounting software?**

No. It writes a CSV of suggestions for you to review and import yourself.

**Is this accounting advice?**

No. Category suggestions are for your review. Check them against your records and your bookkeeper or accountant.

**Is anything saved?**

No. The math runs in your browser and nothing you enter is sent to us.

**Is this tax or financial advice?**

No. It is a calculator for general information. Check the numbers against your own records, and ask an accountant before you act on them.

Related: [net profit margin calculator](/bookkeeping/net-profit-margin-calculator), [operating margin calculator](/bookkeeping/operating-margin-calculator). See [all free tools](/free-tools). More free tools: [Savings goal calculator](/bookkeeping/savings-goal-calculator), [IRR calculator](/bookkeeping/irr-calculator), [Present value and future value calculator](/bookkeeping/present-value-and-future-value-calculator), or [see all free tools](/free-tools).

Free

### Month-End Close Checklist (PDF)

The five-day close, one page to print. Enter your email and we send a link to confirm it is yours, then the download. We may email you about new toolkits, and every email has an unsubscribe link.

General information, not tax or legal advice. [How we write and check our tools](/editorial-standards).

Python scripts

### Bookkeeper's Python Starter Scripts

Three small, readable Python scripts that do chores bookkeepers repeat by hand, with sample files so you can see each one work before using your own data.

[See what is inside ($39)](/toolkits/bookkeeper-python-scripts)

## Want your books and numbers handled?

[Free health check](/bookkeeping/health-check)[Call (908) 444-6373](tel:+19084446373)
