A lightweight, non-destructive Python utility to transform bank CSV export files into the exact format required for import into YNAB 4 (You Need a Budget).
- Non-Destructive: Reads your original bank export and writes out a brand-new, correctly structured CSV file without modifying your source data.
- Automatic Date Conversion: Transforms bank date formats (
YYYY/MM/DD) into YNAB 4 compatible formats (MM/DD/YY). - Column Mapping: Automatically maps bank descriptions to
Payee, debits toOutflow, and credits toInflow, while supplying the necessary blank columns (Category,Memo). - Command-Line Interface: Easily run from the terminal with customizable input and output paths.
Make sure you have Python installed along with the pandas library.
pip install pandasSave the script as ynab_convert.py and run it from your terminal by providing the path to your bank's CSV export:
python ynab_convert.py path/to/your/bank_export.csv-o,--output: Specify a custom path for the output file (default isYNAB_Import_Ready.csv).
Example:
python ynab_convert.py my_bank_data.csv -o custom_ynab_import.csv| YNAB 4 Sample Column | Bank CSV Source | Action / Transformation |
|---|---|---|
Date |
Value Date |
Converted from YYYY/MM/DD to MM/DD/YY |
Payee |
Description |
Mapped directly |
Category |
None | Left blank |
Memo |
None | Left blank |
Outflow |
Debit |
Mapped directly |
Inflow |
Credit |
Mapped directly |
| N/A | Balance |
Dropped (not required by YNAB 4) |