Live
Black Hat USADark ReadingBlack Hat AsiaAI BusinessMicrosoft is automatically updating Windows 11 24H2 to 25H2 using machine learning - TweakTownGoogle News: Machine Learning80 Years to an Overnight Success: The Real History of Artificial Intelligence - Futurist SpeakerGoogle News: AIWhat next for the struggling rural mothers in China who helped to build AI?SCMP Tech (Asia AI)Apple reportedly signed a 3rd-party driver, by Tiny Corp, for AMD or Nvidia eGPUs for Apple Silicon Macs; it s meant for AI research, not accelerating graphics (AppleInsider)TechmemeBest Resume Builders in 2026: I Applied to 50 Jobs to Test TheseDEV CommunityTruth Technology and the Architecture of Digital TrustDEV CommunityI Switched From GitKraken to This Indie Git Client and I’m Not Going BackDEV CommunityWhy I Run 22 Docker Services at HomeDEV CommunityHow to Embed ChatGPT in Your Website: 5 Methods Compared [2026 Guide]DEV CommunityThe Spaceballs sequel will be released in April next yearEngadgetResearch across 1,372 participants and 9K+ trials details "cognitive surrender", where most subjects had minimal AI skepticism and accepted faulty AI reasoning (Kyle Orland/Ars Technica)TechmemeUnpacking Peter Thiel s big bet on solar-powered cow collarsTechCrunchBlack Hat USADark ReadingBlack Hat AsiaAI BusinessMicrosoft is automatically updating Windows 11 24H2 to 25H2 using machine learning - TweakTownGoogle News: Machine Learning80 Years to an Overnight Success: The Real History of Artificial Intelligence - Futurist SpeakerGoogle News: AIWhat next for the struggling rural mothers in China who helped to build AI?SCMP Tech (Asia AI)Apple reportedly signed a 3rd-party driver, by Tiny Corp, for AMD or Nvidia eGPUs for Apple Silicon Macs; it s meant for AI research, not accelerating graphics (AppleInsider)TechmemeBest Resume Builders in 2026: I Applied to 50 Jobs to Test TheseDEV CommunityTruth Technology and the Architecture of Digital TrustDEV CommunityI Switched From GitKraken to This Indie Git Client and I’m Not Going BackDEV CommunityWhy I Run 22 Docker Services at HomeDEV CommunityHow to Embed ChatGPT in Your Website: 5 Methods Compared [2026 Guide]DEV CommunityThe Spaceballs sequel will be released in April next yearEngadgetResearch across 1,372 participants and 9K+ trials details "cognitive surrender", where most subjects had minimal AI skepticism and accepted faulty AI reasoning (Kyle Orland/Ars Technica)TechmemeUnpacking Peter Thiel s big bet on solar-powered cow collarsTechCrunch
AI NEWS HUBbyEIGENVECTOREigenvector

Built a script to categorize expenses automatically. Saved 3 hours/month.

DEV Communityby Nico ReyesApril 3, 20262 min read1 views
Source Quiz

Built a script to categorize expenses automatically. Saved 3 hours/month. Spent every Sunday sorting bank transactions into categories for my freelance accounting. Business meals, software subscriptions, travel, office supplies. Copying stuff from my bank CSV into a spreadsheet. After 6 months of this I finally snapped and wrote a Python script. Before (the painful way) Every week I'd download my bank CSV export. Then open it and categorize each transaction myself: Transaction at "Starbucks" → Business meal "AWS Invoice" → Software/tools "United Airlines" → Travel "Office Depot" → Office supplies For maybe 40 to 60 transactions per week this took about 45 minutes. Hated it. The script Basic Python that reads the bank CSV and categorizes based on keywords. Nothing fancy. import pandas as pd

Built a script to categorize expenses automatically. Saved 3 hours/month.

Spent every Sunday sorting bank transactions into categories for my freelance accounting. Business meals, software subscriptions, travel, office supplies. Copying stuff from my bank CSV into a spreadsheet. After 6 months of this I finally snapped and wrote a Python script.

Before (the painful way)

Every week I'd download my bank CSV export. Then open it and categorize each transaction myself:

  • Transaction at "Starbucks" → Business meal

  • "AWS Invoice" → Software/tools

  • "United Airlines" → Travel

  • "Office Depot" → Office supplies

For maybe 40 to 60 transactions per week this took about 45 minutes. Hated it.

The script

Basic Python that reads the bank CSV and categorizes based on keywords. Nothing fancy.

import pandas as pd

Category rules (keyword matching)

categories = { 'Software': ['aws', 'github', 'digitalocean', 'heroku', 'stripe'], 'Business Meals': ['starbucks', 'chipotle', 'subway', 'restaurant'], 'Travel': ['united', 'delta', 'airbnb', 'uber', 'lyft'], 'Office': ['staples', 'office depot', 'amazon'], }

def categorize_transaction(description): desc_lower = description.lower() for category, keywords in categories.items(): if any(keyword in desc_lower for keyword in keywords): return category return 'Other' # Default

Read bank CSV

df = pd.read_csv('bank_export.csv') df['Category'] = df['Description'].apply(categorize_transaction)

Save categorized output

df.to_csv('categorized_expenses.csv', index=False) print(f"Categorized {len(df)} transactions")`

Enter fullscreen mode

Exit fullscreen mode

How I use it now

  • Download CSV from bank (once a week)

  • Run script: python categorize.py

  • Get categorized CSV in 2 seconds

  • Import to Google Sheets for final review

Script handles about 85% of transactions automatically. The other 15% are random purchases I still do myself, but way better than doing everything.

What could be better

Super basic. No machine learning, no fancy NLP. Just keyword matching. Gets confused sometimes:

  • "Amazon" could be office supplies OR personal shopping

  • "Uber" to client meeting is business, Uber to gym is personal

Thought about adding ML but honestly the keyword approach works fine for my use case. If I spent more time training a model than I save, what's the point.

Time saved

Before: 45 min/week × 4 weeks = 3 hours/month

After: 10 min/week × 4 weeks = 40 min/month

Saved roughly 2h 20min/month. Worth the 2 hours I spent building it.

The keyword dict is easy to customize too. Just add your recurring vendors and categories. Put it on GitHub if anyone wants it.

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

modeltrainingreview

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Built a scr…modeltrainingreviewgithubDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 208 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!