A simple and better version of numerize package that also denumerizes
Project description
numerize_denumerize
A python package to numerize and denumerize numbers.
Installation
pip3 install numerize_denumerize
Usage
from numerize_denumerize import numerize, denumerize
print(numerize.numerize(10000000, decimal_points=2)) # '10.00M'
print(denumerize.denumerize('10.00M')) # 10000000
Methods
numerize(number, decimal_points=2)
This method takes a number and returns a string in the format of x.xxM or x.xxK or x.xxB based on the number.
denumerize(number_string)
This method takes a string in the format of x.xxM or x.xxK or x.xxB and returns the actual number.
Note
Please make sure you provide correct format while calling denumerize method.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file numerize_denumerize-0.0.5.tar.gz
.
File metadata
- Download URL: numerize_denumerize-0.0.5.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f355461a70db291666094517b6cc64a8a757f619878c644c8f6f62a75df3c12 |
|
MD5 | b2f79fa3c8c676116ddf3a334871185f |
|
BLAKE2b-256 | 6b7d1feb143414c1765aae21040c325d6638603e6ee063b5776633154e7e723e |
File details
Details for the file numerize_denumerize-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: numerize_denumerize-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dede9aa411e46ee7a0b6116a95757fe32f68c612ed3959a9077b97fb90efb175 |
|
MD5 | 441b8acce6ac512ecafc91fca0f9684b |
|
BLAKE2b-256 | 95f77532ed8be49bff3ca3c66b1eeb6388ff356d1a98713ae3a1374b269b0a1c |