Spaces:
Running
Running
Update app.py
Browse files
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
|