A Pandas ArrayExtension for handling currency with int64 performance
Project description
Pandas Money
A Pandas ArrayExtension for handling currency with int64 performance
Getting started
Add to your project
poetry add pandas-money
or with pip/pipenv
pipenv install pandas-money
Example
from decimal import Decimal
import pandas as pd
import pandas_money as pm
s = pd.Series(["1.11", "2.22", "3.33"], dtype="Money64")
print(s)
print(s + s)
print(s * Decimal("1.5"))
print(s / 2)
print(s.iloc[0], type(s.iloc[0]))
outputs
0 $1.11
1 $2.22
2 $3.33
dtype: Money64
0 $2.22
1 $4.44
2 $6.66
dtype: Money64
0 $1.66
1 $3.33
2 $5.00
dtype: Money64
0 $0.56
1 $1.11
2 $1.66
dtype: Money64
$1.11 <class 'moneyed.classes.Money'>
Setup
- Clone repo
poetry install
Run tests
make test
Format and lint before commit
make pre-commit
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
pandas_money-1.0.0.tar.gz
(7.5 kB
view details)
Built Distribution
File details
Details for the file pandas_money-1.0.0.tar.gz
.
File metadata
- Download URL: pandas_money-1.0.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.19.0-46-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef267074713555e35872e726aaa239fa44b8f120dc697335d9b1d1d14ed014b4 |
|
MD5 | faf86e5276c650c1f2daa14b5db12e4e |
|
BLAKE2b-256 | 5639b72c680386b9eb6deb0c9bcf78cddd94b035a8e26390c39ac27652bbac16 |
File details
Details for the file pandas_money-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pandas_money-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.19.0-46-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4788ab5031cafd7dca802af46a336c5f35c4e62bf72144597096bbfcf8bb2ba1 |
|
MD5 | a0277510b651699270afe2a3828f6ea5 |
|
BLAKE2b-256 | 8fe4d15bd8535c77b8f3b7e080551765de5d5ee72a9c6fdb27796009b8bd094e |