Checklist
Summary
When using st.column_config.ProgressColumn, setting a max_value that is lower than the actual data value (e.g., data is 11 but max_value is 10) causes the built-in "Download as CSV" feature to export the clipped max_value instead of the original raw data. This leads to data integrity loss in exports.
Reproducible Code Example
import streamlit as st
import pandas as pd
df = pd.DataFrame({"Real Data": [7, 11, 3, 2]})
st.dataframe(
df,
column_config={
"Real Data": st.column_config.ProgressColumn(
"Displayed Data",
min_value=0,
max_value=10,
format="%d",
),
},
)
Steps To Reproduce
- Run the app.
- Observe that the second row shows a "Full" progress bar of 11/10 (visually correct).
- Click the built-in "Download as CSV" button in the dataframe toolbar.
- Open the CSV. Attached an example here.
Expected Behavior
The "Actual Data" column in the CSV should show
Current Behavior
Right now the CSV shows
Is this a regression?
Debug info
- Streamlit version: 1.55.0
- Python version: 3.12.10
- Operating System: Windows 11 Pro
- Browser: Edge
Additional Information
No response
Checklist
Summary
When using
st.column_config.ProgressColumn, setting amax_valuethat is lower than the actual data value (e.g., data is 11 but max_value is 10) causes the built-in "Download as CSV" feature to export the clippedmax_valueinstead of the original raw data. This leads to data integrity loss in exports.Reproducible Code Example
Steps To Reproduce
Expected Behavior
The "Actual Data" column in the CSV should show
Current Behavior
Right now the CSV shows
Is this a regression?
Debug info
Additional Information
No response