CultriX commited on
Commit
4b13fa7
1 Parent(s): 708e0e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -206,6 +206,9 @@ def main():
206
  pages = calculate_pages(df, items_per_page)
207
  page = st.selectbox("Page", list(range(1, pages + 1)))
208
 
 
 
 
209
  # Slice the DataFrame based on the selected page
210
  start = (page - 1) * items_per_page
211
  end = start + items_per_page
 
206
  pages = calculate_pages(df, items_per_page)
207
  page = st.selectbox("Page", list(range(1, pages + 1)))
208
 
209
+ # Sort the DataFrame by 'Average' column in descending order
210
+ df = df.sort_values(by='Average', ascending=False)
211
+
212
  # Slice the DataFrame based on the selected page
213
  start = (page - 1) * items_per_page
214
  end = start + items_per_page