wenjun99 commited on
Commit
105cb3c
·
verified ·
1 Parent(s): 883f962

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -103,10 +103,11 @@ with tab1:
103
  df_sorted = df[[str(h) for h in ascending_headers if str(h) in df.columns]]
104
  df_sorted = df[[str(h) for h in ascending_headers if str(h) in df.columns]].copy()
105
 
106
- # Insert fake column for 3614 with all 0s, in the correct position
107
- insertion_index = df_sorted.columns.get_loc("3562") + 1 # insert after 3562
108
- df_sorted.insert(insertion_index, "3614", 0)
109
 
 
110
  st.subheader("Binary Labels (Ascending Order 3244 → 4882)")
111
  st.dataframe(df_sorted)
112
  st.download_button("Download Ascending Order CSV", df_sorted.to_csv(index=False), "text_binary_labels_ascending.csv", key="download_csv_tab1_ascend")
 
103
  df_sorted = df[[str(h) for h in ascending_headers if str(h) in df.columns]]
104
  df_sorted = df[[str(h) for h in ascending_headers if str(h) in df.columns]].copy()
105
 
106
+ if "3614" not in df_sorted.columns:
107
+ idx = df_sorted.columns.get_loc("3562") + 1 # Insert after 3562
108
+ df_sorted.insert(idx, "3614", 0)
109
 
110
+ print(df_sorted.head(1))
111
  st.subheader("Binary Labels (Ascending Order 3244 → 4882)")
112
  st.dataframe(df_sorted)
113
  st.download_button("Download Ascending Order CSV", df_sorted.to_csv(index=False), "text_binary_labels_ascending.csv", key="download_csv_tab1_ascend")