Moneypandas
Moneypandas is a prototype fork of Cyberpandas for currency, using the money library. Even this README is shamelessly purloigned, with thanks to Tom Augspurger and the ContinuumIO team.
This package provides support for storing currency data inside a pandas DataFrame using pandas' Extension Array Interface
Set Up Dev Environment
Run pipenv shell or another Python3 virtual envirnonment.
Run python3 setup.py develop
The env should be set up. Run python3 examples/three_currency.py to check.
Contributing (For new open source contributers!)
Clone this repo using SSH or HTTPS
For any changes, do git checkout -b [feature/bug][description-of-issue] to create a new branch.
Once your changes are made, git add [file-name]. Add each file individually.
Run git status to make sure all the files you want are added to this commit.
Do git commit -m "A message describing what changes you made, and why, possible bugs, and what you want to do". This will make it easier to refer back to in future.
Run git push -u origin [branch-name]. If there have been no issues then a pull request should be open. Follow the link that was returned in the console to complete the PR.
Example
In [1]: from moneypandas import MoneyArray
In [2]: import pandas as pd
In [3]: df = pd.DataFrame({"money": MoneyArray(['1284 EUR', '121 EUR', '€14'])})
In [4]: df
Out[4]:
money
0 EUR 1,284.00
1 EUR 121.00
2 EUR 14.00
For more examples, including summing and converting mixed-currency columns, see the examples folder.
(note: not yet tested with Conda, only setuptools/pipenv)
To efficiently perform operations, aggregation is done per currency first, and then XMoney used to do necessary operations on the output aggregates.
Currency conversion of a Series only uses XMoney and conversion where currencies mismatch, so converting a column mostly of BBBs, with a few AAAs, should scale according to the number of AAAs.
TODO
- implement more reduce functions
- testing for arithmetic
Metadata
Release files for moneypandas 0.9.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moneypandas-0.9.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for moneypandas-0.9.5-py2.py3-none-any.whl |
Release files / moneypandas-0.9.5-py2.py3-none-any.whl
| Download URL | moneypandas-0.9.5-py2.py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4c6813d0ec4f9cf6200997477270a0e3730351a3bfdd9f3a7d866efef2afdb6e
|
|
BLAKE2b-256 checksum How to use checksums |
bfc5520d2706f6efdb26e0ecb6d20a8cbbab64e23d6fe5da1cb615cffa11b9b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.6
|
Security for moneypandas 0.9.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.