Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Decimal type #2396

Open
blais opened this issue Apr 29, 2024 · 1 comment
Open

Support Decimal type #2396

blais opened this issue Apr 29, 2024 · 1 comment
Labels

Comments

@blais
Copy link

blais commented Apr 29, 2024

It would be quite useful and a propos to support Python's well-written Decimal type distinctly from floats natively. Lots of CSV files commonly contain financial data exported from other systems, data which includes precise numbers expressed as decimal numbers. Operations on these numbers (e.g., sum) should be carried out with Decimal aware operations. While applications such as models won't benefit much from this, applications that deal with accounting and finance will.

I'm not sure how involved the change is, would love to hear your thoughts on what would need to be done, whether it's feasible, difficult or easy, or even desirable. TYTY

@blais blais added the wishlist label Apr 29, 2024
@saulpw
Copy link
Owner

saulpw commented Apr 30, 2024

It shouldn't be too hard; you would start by making your own type like in type_currency.py. If sum() works with Decimal then I'm not sure what else would be needed. Ultimately I think using Decimal for currency would be much better than the current float-cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants