This Python project merges multiple credit card CSV exports into a unified dataset, applies category mappings (by card issuer and transaction description), filters by date, and uploads the result to a specified Google Sheet.
- π Merges multiple credit card CSVs (across years, cards, folders)
- ποΈ Applies standardized categories (via
category_map.yml) - π Supports both category-based and description-based mapping
- π
Filters data by year/month/day via
config.yml - π§Ό De-duplicates and sorts transactions chronologically
- π€ Uploads clean data to a specified tab in a Google Sheet
- β Skips rows already uploaded (prevents duplicates)
- πͺ΅ Rich emoji-based CLI logging
.
βββ merge_cards.py # Main script to merge and categorize transactions
βββ upload_to_g_sheet.py # Script to upload merged data to Google Sheets
βββ config.yml # User config (year, sheet name, etc.)
βββ category_map.yml # Category rules: by category + by description
βββ final_output/
β βββ all_cards.csv # Output of merged and categorized data
βββ card_data/
β βββ Amex/
β β βββ 2024/...
β βββ Chase/
β βββ 2025/...
βββ credentials.yml # Google API credentials (excluded via .gitignore)βοΈ Setup Clone this repo:
git clone https://github.com/your-username/cc-merge.git
cd cc-merge
Create a virtual environment:
python3 -m venv cc_merge
source cc_merge/bin/activate
Install dependencies:
pip install -r requirements.txt
Set up your configuration:
config.yml for year/month/day filters and Google Sheet details
category_map.yml to control how categories are simplified
credentials.yml for Google Sheets access (OAuth2)
π License MIT License