James McCool commited on
Commit
fdf9a85
·
1 Parent(s): 6c2a3a2

Implement pagination for displayed dataframe in app.py

Browse files

- Introduced start and end index variables to facilitate pagination of the dataframe display.
- Enhanced user experience by allowing users to view a subset of data at a time, improving performance and clarity.

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -238,7 +238,8 @@ with tab2:
238
  format(formatter='{:.2%}', subset=st.session_state['stack_frame'].select_dtypes(include=['number']).columns),
239
  hide_index=True)
240
 
241
- # Display the paginated dataframe
 
242
  st.dataframe(
243
  working_df.iloc[start_idx:end_idx].style
244
  .background_gradient(axis=0)
 
238
  format(formatter='{:.2%}', subset=st.session_state['stack_frame'].select_dtypes(include=['number']).columns),
239
  hide_index=True)
240
 
241
+ start_idx = 0
242
+ end_idx = 500
243
  st.dataframe(
244
  working_df.iloc[start_idx:end_idx].style
245
  .background_gradient(axis=0)