Skip to main content

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

numerize_denumerize-0.0.6.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

numerize_denumerize-0.0.6-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

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

Hashes for numerize_denumerize-0.0.6.tar.gz
Algorithm Hash digest
SHA256 137f22d8ba3c08d95ae13e8eb320e05ccb41e1c17b8c864695c89d3496c9050d
MD5 8f726c3dc0564b591536e1a059334bd7
BLAKE2b-256 6d28f20a110b881ba5a48145f077ac2e34341fc3d6d9cbd400e765d081c87679

See more details on using hashes here.

File details

Details for the file numerize_denumerize-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for numerize_denumerize-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1310a2019e88eab9992aa039d28938217ca91e1c02f82579753cfaf48b446800
MD5 38086f6ff09534a8e51adafd7afcf5f8
BLAKE2b-256 db87ab6e851f513c8e8f861e4fadedbfba3a858236e7f29383ef13e4f5327c90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page