Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -212,7 +212,9 @@ with tab3:
|
|
212 |
edited_df = st.data_editor(ef_df, num_rows="dynamic")
|
213 |
|
214 |
if st.button("Convert to Binary Labels"):
|
215 |
-
common_cols = list(set(edited_df.columns) & set(thresholds.index))
|
|
|
|
|
216 |
numeric_cols = edited_df[common_cols].select_dtypes(include=[np.number]).columns.tolist()
|
217 |
|
218 |
binary_part = edited_df[numeric_cols].ge(thresholds[numeric_cols]).astype(int)
|
|
|
212 |
edited_df = st.data_editor(ef_df, num_rows="dynamic")
|
213 |
|
214 |
if st.button("Convert to Binary Labels"):
|
215 |
+
common_cols = list(set(map(int, edited_df.columns)) & set(thresholds.index))
|
216 |
+
common_cols = list(map(str, common_cols)) # Convert back to string for use as column names
|
217 |
+
|
218 |
numeric_cols = edited_df[common_cols].select_dtypes(include=[np.number]).columns.tolist()
|
219 |
|
220 |
binary_part = edited_df[numeric_cols].ge(thresholds[numeric_cols]).astype(int)
|