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.14.tar.gz
(11.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
gncxml-0.7.14-py3-none-any.whl
(12.8 kB
view details)
File details
Details for the file gncxml-0.7.14.tar.gz.
File metadata
- Download URL: gncxml-0.7.14.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/24.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5af244556037a3d940c98df46b631396d040bac681ba47d57451d59f605a4428
|
|
| MD5 |
d00c39929c786fa288ca35b30e1be51d
|
|
| BLAKE2b-256 |
9b66229c6abe0602cd892fd550fc08913c00ff4a1b298fbe5e3fd655f8f4a828
|
File details
Details for the file gncxml-0.7.14-py3-none-any.whl.
File metadata
- Download URL: gncxml-0.7.14-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/24.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
048803847c7e3652b02285e5ad9e695fdf72747b7f6b9fea4eea81e16dfe4ebe
|
|
| MD5 |
4a3ff0b36b15d08388cc55b4399f5a83
|
|
| BLAKE2b-256 |
a03c6a9e6bb4b907fee69afe42fc9530ea1eaeb1456bc1618527977fcaef9a75
|