Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

numerize-denumerize

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

numerize-denumerize

A simple and better version of numerize package that also denumerizes

  • 0.0.6
  • PyPI
  • Socket score

Maintainers
1

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc