Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -205,7 +205,7 @@ def main():
|
|
205 |
#df = df3
|
206 |
df3["CauseOrEffect"].replace({"C": "cause", "E": "effect"}, inplace=True)
|
207 |
df_final = df3[df3['CauseOrEffect'] != 'CT']
|
208 |
-
|
209 |
|
210 |
df_final = df_final.drop("Component",axis=1)
|
211 |
df_final.insert(2, "Component", df3['New string'], True)
|
@@ -506,8 +506,8 @@ def main():
|
|
506 |
|
507 |
|
508 |
|
509 |
-
|
510 |
-
|
511 |
|
512 |
#st.download_button(label="Download the detailed result table",data=buffer,file_name="df_final.xlsx",mime="application/vnd.ms-excel")
|
513 |
st.download_button(label="Download the result table",data=buffer,file_name="df_tab.xlsx",mime="application/vnd.ms-excel")
|
|
|
205 |
#df = df3
|
206 |
df3["CauseOrEffect"].replace({"C": "cause", "E": "effect"}, inplace=True)
|
207 |
df_final = df3[df3['CauseOrEffect'] != 'CT']
|
208 |
+
df3['New string'] = df_final['Component'].replace(r'[##]+', ' ', regex=True)
|
209 |
|
210 |
df_final = df_final.drop("Component",axis=1)
|
211 |
df_final.insert(2, "Component", df3['New string'], True)
|
|
|
506 |
|
507 |
|
508 |
|
509 |
+
st.download_button(label="Download the detailed result table_csv",data=csv1,file_name='results.csv',mime='text/csv')
|
510 |
+
st.download_button(label="Download the result table_csv",data=csv2,file_name='final_data.csv',mime='text/csv')
|
511 |
|
512 |
#st.download_button(label="Download the detailed result table",data=buffer,file_name="df_final.xlsx",mime="application/vnd.ms-excel")
|
513 |
st.download_button(label="Download the result table",data=buffer,file_name="df_tab.xlsx",mime="application/vnd.ms-excel")
|