Extract entries from GnuCash data file to pandas.DataFrame.
Project description
gncxml
gncxml - extract entries from GnuCash data file to pandas.DataFrame
Installation
pip install gncxml
Usage (Command Line)
usage: gncxml [-h] [-l] [--csv] TYPE [FILE]
gncxml - print entries in GnuCash data file as data frame
positional arguments:
TYPE type of entries to print (account | commodity | price | split |
transaction)
FILE GnuCash data file (XML format)
optional arguments:
-h, --help show this help message and exit
-l, --long list in long format
--csv print in csv format
Usage (Python Module)
import sys
import gncxml
try:
book = gncxml.Book("mybook.gnucash")
except OSError as err:
sys.exit(err)
# Extract splits as pandas.DataFrame
df = book.list_splits()
print(df[df["trn_date"] >= "2023-07-01"].to_csv())
See also: examples/module_usage.ipynb
License
Copyright 2017-2022 LiosK
Licensed under the Apache License, Version 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gncxml-0.7.4.tar.gz
(11.7 kB
view hashes)
Built Distribution
gncxml-0.7.4-py3-none-any.whl
(12.8 kB
view hashes)