ProgrammingCodexAdvanced
Ask Codex to turn a bank export into a tidy spreadsheet
Let Codex write a small script that reads the bank CSV and writes fixed columns. You run the script locally and do not give the agent access to the account.
- Tool
- Codex
- Category
- Programming
- Difficulty
- Advanced
- Published
You set up a tool and check the result yourself.
How to do it
- 1
Download a CSV from the bank and make a copy. Remove the account number and counterparty names if you do not need them. Keep a few rows as a sample.
- 2
Write down the column names as they actually appear, and whether the bank uses a comma or a dot as the decimal mark. Do not assume the agent knows the format.
- 3
Ask Codex to write a script that reads the file and writes a new CSV with the columns you ask for. Amounts should be kept, not interpreted differently from what you described.
- 4
Read the script before you run it. It should only read the local file and write a new file, not send data anywhere.
- 5
Run the script on the copy and spot-check rows against the original. Run it on the rest only when the sample matches.
Example prompt
Example prompt
Write a Python script that reads bank.csv in the same folder. The first line is a header. The columns are named Dato, Tekst and Beløp. The decimal mark is a comma, and the thousands separator is a space. Write ryddet.csv with the same three columns, amounts with a dot as the decimal mark, and no other columns. The script must not use the network. Do not guess other column names. If a row has the wrong number of fields, write the row number to stderr and skip it.
Source
The editors wrote this example. It is not based on an external article, and we have not invented quotes or figures.