Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -1
src/streamlit_app.py
CHANGED
@@ -194,7 +194,10 @@ def main():
|
|
194 |
|
195 |
# 顯示表格
|
196 |
st.subheader("📋 查詢結果")
|
197 |
-
|
|
|
|
|
|
|
198 |
st.dataframe(
|
199 |
display_df,
|
200 |
use_container_width=True,
|
|
|
194 |
|
195 |
# 顯示表格
|
196 |
st.subheader("📋 查詢結果")
|
197 |
+
# 先按評分排序,然後選擇要顯示的欄位
|
198 |
+
sorted_df = filtered_df.sort_values('評分_數值', ascending=False)
|
199 |
+
display_df = sorted_df[['店名', '地址', '評分', '區段']]
|
200 |
+
|
201 |
st.dataframe(
|
202 |
display_df,
|
203 |
use_container_width=True,
|