02 — The demo CSV
Duration: 10 min Prerequisites: a text editor or VS Code.
Where the data lives
Section titled “Where the data lives”The repo ships with a ready-to-use CSV at:
csv-llm-ollama/└── data/ └── data1-anonymized.csv ← 734 synthetic transactionsYou can open it in any editor. It’s a plain ;-separated file with quoted strings.
File format
Section titled “File format”Header (first line):
"Date";"Card Number";"Description";"Category";"Debit";"Credit"A few rows:
"2027-12-27";"************4382";"Late Payment Fee";"Fees";"24.31";"0""2027-12-26";"************4382";"Postbox Rental";"Housing";"489.53";"0""2027-12-25";"************4382";"City Cab Network";"Transport";"73.34";"0""2027-12-24";"************4382";"Travel Booking Refund";"Refunds";"0";"69.15""2027-12-24";"************4382";"Harbor Noodle House";"Dining";"59.22";"0""2027-12-23";"************4382";"Credit Card Payment Thank You";"Payments";"0";"850.65"Six columns:
| Column | Type | Notes |
|---|---|---|
Date | YYYY-MM-DD | All transactions in 2027 |
Card Number | masked | Always ************4382 |
Description | string | The merchant name |
Category | string | One of 13 English categories |
Debit | string number | Money out; "0" if not applicable |
Credit | string number | Money in (refunds, card payments) |
The numbers
Section titled “The numbers”| Metric | Value |
|---|---|
| Rows (excl. header) | 734 |
Expense rows (Debit > 0) | 675 |
Credit rows (Credit > 0) | 59 |
| Total debit | $118,667.69 |
| Total credit | $43,707.67 |
| Date range | 2027-01-02 → 2027-12-27 |
| Distinct months | 12 |
The 13 categories
Section titled “The 13 categories”| Category | Example merchants |
|---|---|
Business | DesignMarket License, PrintWorks Studio, Invoice Client Deposit |
Dining | Harbor Noodle House, Coastal Spoon Cafe, Maple Table Bistro |
Education | Online course bundles, certification fees |
Entertainment | PuzzleRoom Adventure, Riverfront Music Hall, GameCorner Store |
Fees | Late Payment Fee, foreign exchange fees |
Groceries | Wellington Pantry Co, Canterbury Family Foods, Rotorua Organic Store |
Health | CarePlus Lab Services, ActiveLife Physiotherapy |
Housing | Rent Payment Willow Street, Postbox Rental, StorageBox Monthly |
Payments | Credit Card Payment Thank You (statement-level entries) |
Refunds | Travel Booking Refund and other returns |
Transport | City Cab Network, NorthLine Bus Card, GreenRide Shuttle |
Travel | Queenstown Path Pass, Aotearoa Lodge Booking, Pacific Coast Hostel |
Utilities | ClearNet Fibre, Harbor Internet Co |
Top categories by spend
Section titled “Top categories by spend”A quick pandas look (you’ll do this in chapter 07):
import pandas as pddf = pd.read_csv("data/data1-anonymized.csv", sep=";", quotechar='"')df["Debit"] = pd.to_numeric(df["Debit"], errors="coerce").fillna(0)print(df.groupby("Category")["Debit"].sum().sort_values(ascending=False).head(5))Expected output:
CategoryHousing 30895.29Travel 16597.44Business 14386.39Groceries 9725.93Education 8987.85Name: Debit, dtype: float64A few useful merchants to memorize
Section titled “A few useful merchants to memorize”These will show up in the Chat demos in chapter 09:
| Merchant | Visits | Total spent |
|---|---|---|
| Coastal Spoon Cafe | 19 | $1,221.34 |
| Harbor Noodle House | 18 | $1,095.60 |
| NorthLine Bus Card | 18 | $795.76 |
| Rent Payment Willow Street | 8 | $6,761.44 |
| Queenstown Path Pass | 8 | $4,315.40 |
We’ll use Coastal Spoon Cafe as the recurring merchant for canonical question Q3.
Loading the file in Python
Section titled “Loading the file in Python”A simple read (we’ll do better in chapter 04 with csv-llm-shared/ingest.py):
from pathlib import Pathimport csv
path = Path("csv-llm-ollama/data/data1-anonymized.csv")with path.open(encoding="utf-8-sig") as f: reader = csv.DictReader(f, delimiter=";", quotechar='"') rows = list(reader)
print(len(rows)) # 734print(rows[0])# {'Date': '2027-12-27', 'Card Number': '************4382', ...}Takeaways
Section titled “Takeaways”- The repo ships with
csv-llm-ollama/data/data1-anonymized.csv— 734 synthetic transactions. - 6 columns,
;separator, UTF-8 BOM tolerant. - 12 months of 2027, 13 English categories, 1 masked card.
- Top category is Housing ($30,895.29). Most-frequent merchant is Coastal Spoon Cafe (19 visits).