Skip to content

SamEdwardes/prettynum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prettynum

Simple number formatting for python inspired by the scales package in R. prettynum is lightweight and has not third party library dependencies.

Installation

pip install prettynum

Usage

>>> from prettynum import comma, dollar
>>> comma(1000)
'1,000'
>>> comma(1000, 3)
'1,000.000'
>>> comma(1000.89, 1)
'1,000.9'
>>> dollar(1000)
'$1,000'
>>> dollar(1000, 3)
'$1,000.000'
>>> dollar(1000.89, 1)
'$1,000.9'

About

Simple number formatting for python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages