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.6.tar.gz
.
File metadata
- Download URL: numerize_denumerize-0.0.6.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 137f22d8ba3c08d95ae13e8eb320e05ccb41e1c17b8c864695c89d3496c9050d |
|
MD5 | 8f726c3dc0564b591536e1a059334bd7 |
|
BLAKE2b-256 | 6d28f20a110b881ba5a48145f077ac2e34341fc3d6d9cbd400e765d081c87679 |
File details
Details for the file numerize_denumerize-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: numerize_denumerize-0.0.6-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 | 1310a2019e88eab9992aa039d28938217ca91e1c02f82579753cfaf48b446800 |
|
MD5 | 38086f6ff09534a8e51adafd7afcf5f8 |
|
BLAKE2b-256 | db87ab6e851f513c8e8f861e4fadedbfba3a858236e7f29383ef13e4f5327c90 |