Built a script to categorize expenses automatically. Saved 3 hours/month.
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 subscrip...

Source: DEV Community
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': ['