People also love to hate R but data.table is light years better than pandas in my view
BEGIN{
FS = ",";
}
{
if(FNR > 1){
date = gensub(/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/, "\\3-\\1-\\2", 1, $1);
print date, $3
print " liabilities:chase"
if($5 != "Payment"){
print " expenses:" $4, " $", $6 \* -1.0
}else{
## This exists because I have an offset in the account
## I use to pay the card with. If the amount in my residual
## account != 0, I know there is something wrong
print " liabilities:chase:residual $", -$6
}
}
}
Suppose this script is called 'parse.awk', you would then run:
awk -f parse.awk myfile.csv