This is a simple script to grab the CSV exported by N26 and calculate the sum of incoming values (positive transactions only).
The script is written in Python and uses the built-in csv
and sys
modules. It reads the CSV file line by line and treats each line as a dictionary object. The "Amount (EUR)" value of each transaction is added to a running total if it is a positive value. The final sum is rounded to two decimal places and printed out.
- Python 3.6 or higher
To run the script, you'll need to pass the filename as a command line argument.
-
Open a Terminal window.
-
Navigate to the directory containing the script and your CSV file.
-
Run the following command:
python3 N26-CSV.py yourfilename.csv