Jun-05-2020, 03:59 PM
>>> p = 0.3194933145672062 >>> f"{p}" '0.3194933145672062' >>> f"{p:.0%}" '32%' >>> f"{p:.2%}" '31.95%'
Formatting a Decimal to a Percentage
|
|
Messages In This Thread |
Formatting a Decimal to a Percentage - by dgrunwal - Jun-05-2020, 03:16 PM
RE: Formatting a Decimal to a Percentage - by Gribouillis - Jun-05-2020, 03:47 PM
RE: Formatting a Decimal to a Percentage - by bowlofred - Jun-05-2020, 03:59 PM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
print function help percentage and slash (multiple variables) | leodavinci1990 | 3 | 2,500 |
Aug-10-2020, 02:51 AM Last Post: bowlofred |
|
How to calculate unique rows column sum and percentage | SriRajesh | 4 | 3,474 |
Feb-12-2020, 02:21 PM Last Post: SriRajesh |
|
testing for Decimal w/o importing decimal every time | Skaperen | 7 | 4,475 |
May-06-2019, 10:23 PM Last Post: Skaperen |
|
How to calculate percentage change sum (Mean) by group | SriRajesh | 3 | 3,801 |
Jan-09-2019, 12:28 PM Last Post: SriRajesh |