IanYeo commited on
Commit
2c4eec1
1 Parent(s): 30b8b41

embed further

Browse files
Files changed (1) hide show
  1. app.py +26 -26
app.py CHANGED
@@ -165,7 +165,6 @@ if cobie_file_button:
165
  cobie_file = pd.ExcelFile(cobie_file_path)
166
  tabs = cobie_file.sheet_names
167
 
168
- selected_column = None
169
  df = pd.DataFrame()
170
 
171
  if tabs:
@@ -178,34 +177,35 @@ if tabs:
178
 
179
  df = cobie_file.parse(selected_sheet)
180
 
181
- if type(df) == pd.DataFrame:
182
 
183
- # st.write(df)
184
- columns = df.columns
185
- selected_column = st.selectbox(
186
- 'Select column with revit ids',
187
- columns,
188
- )
189
-
190
- if selected_column:
191
-
192
- # df['COBieGUID'] = df.apply(compress)
193
- df[selected_column] = df.apply(
194
- revit_id_to_guid,
195
- column=selected_column,
196
- axis=1
197
  )
198
 
199
- st.markdown(
200
- download_button(
201
- df,
202
- 'IFC_GUIDs.xlsx',
203
- 'Download IFC GUIDs sheet',
204
- pickle_it=False,
205
- ),
206
- unsafe_allow_html=True,
207
- )
208
- st.markdown(download_button(df, 'COBieIDs.xlsx', 'Download COBieIDs.xlsx'), unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
209
 
210
 
211
 
 
165
  cobie_file = pd.ExcelFile(cobie_file_path)
166
  tabs = cobie_file.sheet_names
167
 
 
168
  df = pd.DataFrame()
169
 
170
  if tabs:
 
177
 
178
  df = cobie_file.parse(selected_sheet)
179
 
180
+ if type(df) == pd.DataFrame:
181
 
182
+ # st.write(df)
183
+ selected_column = None
184
+ columns = df.columns
185
+ selected_column = st.selectbox(
186
+ 'Select column with revit ids',
187
+ columns,
 
 
 
 
 
 
 
 
188
  )
189
 
190
+ if selected_column:
191
+
192
+ # df['COBieGUID'] = df.apply(compress)
193
+ df[selected_column] = df.apply(
194
+ revit_id_to_guid,
195
+ column=selected_column,
196
+ axis=1
197
+ )
198
+
199
+ st.markdown(
200
+ download_button(
201
+ df,
202
+ 'IFC_GUIDs.xlsx',
203
+ 'Download IFC GUIDs sheet',
204
+ pickle_it=False,
205
+ ),
206
+ unsafe_allow_html=True,
207
+ )
208
+ st.markdown(download_button(df, 'COBieIDs.xlsx', 'Download COBieIDs.xlsx'), unsafe_allow_html=True)
209
 
210
 
211