Issue using st.dataframe with df.styles.format to format floats with 2 decimal places. See gist containing minimal case with 2 files at:
ERROR occurs at line containing this statement:
st.dataframe(df.style.format({‘ItemSubTotalAmount’: ‘{:.2f}’, ‘TaxAmount’: ‘{:.2f}’, ‘TotalAmount’: ‘{:.2f}’}))
REPRODUCTION STEPS:
SUCCESS CASE:
streamlit run https://gist.github.com/evoshawkins/1432dc9dd3c6a4358c8eb28688519734/raw/5bc7998d663779150389973313c4a1396348ded2/issue.py
FAIL CASE:
streamlit run https://gist.github.com/evoshawkins/1432dc9dd3c6a4358c8eb28688519734/raw/5bc7998d663779150389973313c4a1396348ded2/issue-fail.py
The 1st example reads the CSV file from:
“https://leg-2-lou-docs-pics.s3.us-west-2.amazonaws.com/reports/invoices_success_8456_rows.csv”
The 2nd example points read the CSV file from: (it has one more row):
“https://leg-2-lou-docs-pics.s3.us-west-2.amazonaws.com/reports/invoices_fail_8457_rows.csv”