Transaction Categorization Dataset

This dataset provides a comprehensive, labeled collection of real-world bank transactions, including raw descriptions, merchant information, categorized labels, and enrichment fields for AI training. It enables robust development of transaction categorization, statement enrichment, and personal finance analytics models, supporting both supervised and semi-supervised learning scenarios.

  • opened 18 times
  • last updated 22 Jul 2025
  • by GoMask
The brief that made it

Training AI models for automated transaction categorization

Sample rows

preview · 8 of 200 rows · all 20 columns
transaction_idstringlabel_sourcestringbalance_after_transactionfloatis_recurringbooleanmerchant_category_codestringaccount_idstringtransaction_datedateposting_datedateamountfloatcurrencystringdescriptionstringmerchant_namestringcategorystringsubcategorystringtransaction_typestringenriched_labelstringlocation_citystringlocation_statestringlocation_countrystringreference_numberstring
TXN000001human1845.68false5942ACCT10012023-01-062023-01-07-84.32USDAMAZON MKTPLACE PMTS 1234AmazonShoppingOnline RetaildebitShopping - Amazon PurchaseDallasTXUSRFAMZ123456
TXN000002human5045.68trueblankACCT10022023-01-312023-02-013200USDPAYROLL DIRECT DEP 5678Acme CorpIncomeSalarydepositIncome - Salary PaymentNew YorkNYUSRFDEP8765432
TXN000003ai1212.41true5735ACCT20012023-01-112023-01-12-9.99EURSPOTIFY SUBSCRIPTION 4321SpotifyEntertainmentMusic StreamingpaymentEntertainment - Spotify RecurringBerlinblankDERFSPT987654
TXN000004human1390.12false5411ACCT10032023-01-092023-01-09-126.45USDWALMART SUPERCENTER #1288WalmartGroceriesSupermarketsdebitGroceries - WalmartChicagoILUSRFWMT102938
TXN000005ai923.87true7997ACCT10042023-01-052023-01-06-65USDPLANET FITNESS MONTHLY FEEPlanet FitnessHealthGym MembershippaymentHealth - Planet Fitness RecurringMiamiFLUSRFPF765432
TXN000006human1799.92false4121ACCT10012023-01-102023-01-10-45.76USDUBER TRIP 0912UberTransportRidesharedebitTransport - Uber RideLos AngelesCAUSRFUBR384756
TXN000007ai1136.21false4511ACCT20022023-01-142023-01-15-76.2EURLUFTHANSA AIR TICKET 001LufthansaTravelAirlinespaymentTravel - Lufthansa FlightFrankfurtblankDERFLFT234567
TXN000008human2000trueblankACCT10052023-01-032023-01-04-2500USDRENT PAYMENT JAN 2023Sunrise ApartmentsHousingRentpaymentHousing - Monthly RentSeattleWAUSRFREN998877

What the 200 rows show

from the 200-row sample

Other (label source) stands out: mean balance_after_transaction is 195,972, against 32,411 for the rest.

  • 36%is_recurring = true
  • 1,541median balance_after_transaction
  • 5currencies
  • 7location countries
  • 9transaction types
  • 14location states
Mean balance_after_transaction by label_source200 rows
0100k200k47,892human88 rows17,919ai94 rows196kother18 rows
balance_after_transaction200 rows, in bands of 200k
095190189040070600k1.2Mbalance_after_transaction →

Median 1,541, from 0.01 to 1,000,000.

merchant_category_code152 rows with a value · 48 left blank
  1. 541121
  2. 412112
  3. 594210
  4. 573510
  5. 489910
  6. 79979
  7. 59129
  8. 58148
  9. 58126
  10. 48126
20 columns by typefrom the column list below
  • string 15
  • float 2
  • date 2
  • boolean 1

Columns

20 columns in four groups
blueprint · 20 columns
columntypedescriptionexample
Text 15 columns
transaction_idstringUnique identifier for each bank transaction.uniqueTXN000001
account_idstringUnique identifier for the account associated with the transaction.ACCT1001
currencystringCurrency code (ISO 4217) of the transaction (e.g., USD, EUR).5 currenciesUSD
descriptionstringRaw transaction description as provided by the bank.PAYROLL DIRECT DEP 5678
merchant_namestringName of the merchant or payee, if available.optionalAmazon
merchant_category_codestringMerchant Category Code (MCC) associated with the transaction, if available.optional5942
categorystringLabeled category assigned to the transaction (e.g., 'Groceries', 'Utilities', 'Dining').Shopping
subcategorystringMore granular subcategory label for the transaction (e.g., 'Supermarkets', 'Electricity').optionalOnline Retail
transaction_typestringType of transaction, such as 'debit', 'credit', 'refund', 'fee', etc.9 valuesdebit
enriched_labelstringAI-generated or human-enriched label for statement clarity (e.g., 'Netflix Subscription').optionalIncome - Salary Payment
location_citystringCity where the transaction took place, if available.optionalDallas
location_statestringState or region where the transaction took place, if available.optionalTX
location_countrystringCountry where the transaction took place, if available.7 countries · optionalUS
reference_numberstringBank-provided reference number for the transaction.optionalRFAMZ123456
label_sourcestringIndicates whether the category label is human-annotated or AI-generated.human · ai · other · optionalhuman
Numbers 2 columns
amountfloatTransaction amount. Positive for credits, negative for debits.-84.32
balance_after_transactionfloatAccount balance immediately after the transaction.optional1845.68
Dates and times 2 columns
transaction_datedateDate when the transaction occurred.2023-01-06
posting_datedateDate when the transaction was posted to the account.optional2023-01-07
True or false 1 column
is_recurringbooleanIndicates if the transaction is part of a recurring series (e.g., subscriptions, rent).optionalfalse

15 SQL practice questions for the Transaction Categorization Dataset

Written for this data and checked against it: 12 SQL and 3 Power BI exercises from beginner to advanced. Try the first three free; the practice kit has all 15, a starter .sql file and an answer key with every expected result.

  1. 01BeginnerFreeSELECT · WHERE · ORDER BY

    Large debit transactions

    Return transaction_id, account_id, amount and currency for every transaction with an amount below -1000. Sort by amount ascending (most negative first), then by transaction_id.

    Tables: transaction_categorization_dataset · your result: 4 columns, 11 rows
  2. 02BeginnerFreeDISTINCT · ORDER BY

    Distinct categories

    Return each distinct category in the data as a single column named category, sorted alphabetically.

    Tables: transaction_categorization_dataset · your result: 1 columns, 16 rows
  3. 03BeginnerFreeGROUP BY · COUNT

    Transactions per currency

    Count the transactions for each currency. Return currency and txn_count, sorted by txn_count from highest to lowest, then by currency.

    Tables: transaction_categorization_dataset · your result: 2 columns, 5 rows
  1. 04Average amount by label sourceBeginner
  2. 05Recurring transactions summaryPower BI
  3. 06Categories with many transactionsIntermediate
  4. 07Amount size bucketsIntermediate
  5. 08Transactions per monthIntermediate
  6. 09Accounts with above-average balanceIntermediate
  7. 10Missing merchant share by categoryPower BI
  8. 11Rank categories by spendAdvanced
  9. 12Days since previous transactionAdvanced
  10. 13Running total for USD amountsAdvanced
  11. 14Anomalous amounts within categoryAdvanced
  12. 15Percent of total by currencyPower BI

Get the practice kit: the full dataset, all 15 exercises, a starter .sql and the answer key. One-time $3.99.

Get the practice kit · $3.99

Use it for

  • is recurring36%72 of 200 rowsmean balance after tr…47.9khuman17.9kai196kother

    A finance dashboard

    The is_recurring rate, balance_after_transaction by label_source and a breakdown of merchant_category_code. Excel, Power BI or Tableau.

  • Why do the 18 other rows have a mean balance_after_transaction of 195,972?

    A root-cause class exercise

    Hand out the rows and one question. The answer is in the data, not in the brief.

  • A software demo

    Believable transactions with account_id, transaction_date and posting_date to fill a screen in front of a buyer.

Not quite right?

Make it yours.

Same 20 columns, your size and your rules. See 20 rows before you pay.

Preview 20 rows free

1,000 rows: $1.99 · 10,000: $12.99One-time. No subscription. All prices

This dataset200 rows20 columns
Yours1,000 rows20 columnslocation_city: UK only

blueprint · transaction-categorization-dataset

Behind this dataset

Same schema. As many rows as you need.

These 200 rows came out of a blueprint — 20 columns with generation rules behind each one. Open it in Data Factory to retune a column, add your own, wire in foreign keys, and run it at the size you actually need.

Rules it was built with
  • Each transaction labeled with a category.
  • Merchant, amount, and timestamp included.
  • Recurring transaction flags present.
  • Anomalies (mislabeling, ambiguous) introduced.
Rows
Open the blueprint in Data Factory

1 credit per row. Preview 20 rows free. Buy rows for the full run.

Exports
CSV, JSON, JSONL, Parquet, SQL, Excel, TSV, XML
Licence
yours to use, including commercially
API slug
transaction-categorization-dataset

What should your data show?

Preview 20 rows free
No signup. No card.