Export Account Journal as CSV

47 views
Skip to first unread message

Viggo Forsberg

unread,
Oct 16, 2022, 3:31:22 PM10/16/22
to Beancount
Hello!

I have a seemingly easy problem that I am trying to solve. I have generated a journal report and I would like to format it in to csv.

My question is: How is the journal report delimited? I have tried to use sep= "/s+" and "/t"
in pandas but for some reason it does not recognize either and just returns 1 column.

Here is my code:

In terminal: bean-report ledger.beancount  journal -a Assets:Bank -b -w 120 > report.csv

In pycharm:
import pandas as pd
df = pd.read_csv("report.csv", sep='/s+', header=None, engine="python")
print(df)

(the returned dataframe is just one column)

Is there an obvious reason to why I am unable to parse the report?

If anyone has a good solution to this I would greatly appreciate it!

Thanks,
Viggo

Martin Blais

unread,
Oct 16, 2022, 3:37:46 PM10/16/22
to bean...@googlegroups.com
- bean-report is deprecated
- bean-query has a "-f csv" option


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/ed66c188-fc1b-4304-9a1a-ea3eb348ac83n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages