What this is
A small Python script that cleans raw bank CSV exports so they can be used for analysis and AI tools.
Bank CSV exports are not structured in a way that is easy to work with, especially when trying to use them as input for analysis or AI tools.
The raw export from my bank includes extra metadata, encoding issues, and unnecessary columns that make it difficult to process.
Problem
The original CSV format contains:
- mixed metadata and transaction data
- unclear column structure
- encoding issues (special characters)
- more information than needed for simple analysis
Example (raw, fake data):
Transactions period 2000-01-01 - 2000-01-31
Row,SortCode,AccountNo,Account,BookingDate,TransactionDate,Description,Amount,Balance
1,0000,0000000000,Example Account,2000-01-02,2000-01-02,Example Transfer,100.00,1100.00
Approach
I created a Python script that:
- removes unnecessary columns
- normalizes encoding (fixes characters)
- restructures the data into a clean format
- extracts only relevant fields
The output format is simplified and consistent.
Result
Clean CSV (fake data):
Row,Date,Account,Description,Amount
1,2000-01-02,Example Account,Example Transfer,100.00
2,2000-01-01,Example Account,Example Store,-12.34
This format is:
- easier to read
- easier to process programmatically
- suitable for AI input and further analysis
What I learned
This was a small but useful step in understanding:
- data cleaning
- structuring data for downstream usage
- how small automation scripts can remove repetitive friction
It also connects to a broader idea of building simple pipelines for personal data analysis.