Hi, i am trying to format a column with % format. I tried:
st.dataframe(AuM_classe.style
.format({"AuM": lambda x: human_format(x) + '€',
'Total en %' : '{:,.2%}'}),
column_config={"GroupeCat_rng1": "Classe d'actif",
"GroupeCat_Specific_Dynamic": 'Zone géographique',
"AuM": st.column_config.NumberColumn("Actif Net"),
'RetYTD' : st.column_config.NumberColumn("Rendement YTD", format='%.2f %%')
},
hide_index=True,
use_container_width=True
)
but get (extraction from a part of my result):
Actions Actions -1.776216
Actions Actions Amérique du Nord 12.966200
Actions Actions Asie 7.826019
whereas I was expecting to get:
Actions Actions -1.77%
Actions Actions Amérique du Nord 12.96%
Actions Actions Asie 7.82%
Also when I try:
'RetYTD' : st.column_config.NumberColumn("Rendement YTD", format='%.1f')
I got the same result. Strange isn’t it ?
the dtypes of my data is:
RetYTD double[pyarrow]
Ret1a double[pyarrow]
Ret3a double[pyarrow]
Ret5a double[pyarrow]
Any idea ?