Simple number formatting for python
Project description
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'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prettynum-0.1.0.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for prettynum-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a0e1cf6981bddafb0a4884c232fe9d389d8b3cc95a9b1e35f244e000f8d09c7 |
|
MD5 | c7bf302595cfcfbd947adb1fa2d4a6a2 |
|
BLAKE2b-256 | 058ba1b28618230c1001897e00b268d45e0da8d9d2dfd6dc0f8192a61ca18e7b |