Skip to content

dheereshagrwal/numerize_denumerize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages