From 039e676210c1ec73437bc7369f00bc1120399489 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 7 Sep 2022 12:08:38 +0200 Subject: [PATCH] Default all floating number displays to 2 decimals --- _drivers-of-inequality-djibouti.qmd | 2 -- _drivers-of-inequality-uganda.qmd | 1 - index.qmd | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/_drivers-of-inequality-djibouti.qmd b/_drivers-of-inequality-djibouti.qmd index 02516e3..cf95943 100644 --- a/_drivers-of-inequality-djibouti.qmd +++ b/_drivers-of-inequality-djibouti.qmd @@ -192,8 +192,6 @@ totals = df.loc[ ] electricityaid = totals[totals['DONOR'] < 20000] # drop all 'total' aggregations -pd.options.display.float_format = "{:.2f}".format - el_grouped = electricityaid.groupby(['Year', 'Flow']).agg({'Value': ['sum']}) el_grouped.style.format(escape="latex") el_grouped diff --git a/_drivers-of-inequality-uganda.qmd b/_drivers-of-inequality-uganda.qmd index aa34466..7a976e3 100644 --- a/_drivers-of-inequality-uganda.qmd +++ b/_drivers-of-inequality-uganda.qmd @@ -229,7 +229,6 @@ when the amount first increased to 800m USD in 2019 and subsequently to over 1.7 #| label: tbl-uga-aid-watersupply #| tbl-cap: "ODA projects of water and sanitation supply in Uganda per year, separated by project type" #| column: page -pd.options.display.float_format = "{:.2f}".format # 14020-22 - large scale potable water # 14030-32 - individual-level water and sanitation supply diff --git a/index.qmd b/index.qmd index 0f387b7..2cea105 100644 --- a/index.qmd +++ b/index.qmd @@ -9,6 +9,7 @@ nocite: | ```{python} svg_render = True +pd.options.display.float_format = "{:.2f}".format ``` {{< include _drivers-of-inequality-vietnam.qmd >}}