Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -502,20 +502,27 @@ def process_excel(file):
|
|
502 |
# project_proposals_df.to_excel(writer, sheet_name='Project_Proposals', index=False)
|
503 |
|
504 |
budget_cluster_df.to_excel(writer, sheet_name='Financial_Weights')
|
505 |
-
problem_cluster_df.to_excel(writer, sheet_name='Problem_Descriptions')
|
506 |
processed_df.to_excel(writer, sheet_name='Input_Processed', index=False)
|
507 |
-
|
508 |
-
|
509 |
-
if isinstance(
|
510 |
-
|
511 |
else:
|
512 |
console_messages.append("Converting Location Clusters to df")
|
513 |
-
pd.DataFrame(
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
|
520 |
|
521 |
|
|
|
502 |
# project_proposals_df.to_excel(writer, sheet_name='Project_Proposals', index=False)
|
503 |
|
504 |
budget_cluster_df.to_excel(writer, sheet_name='Financial_Weights')
|
|
|
505 |
processed_df.to_excel(writer, sheet_name='Input_Processed', index=False)
|
506 |
+
|
507 |
+
|
508 |
+
if isinstance(problem_cluster_df, pd.DataFrame):
|
509 |
+
problem_cluster_df.to_excel(writer, sheet_name='Problem_Descriptions')
|
510 |
else:
|
511 |
console_messages.append("Converting Location Clusters to df")
|
512 |
+
pd.DataFrame(problem_cluster_df).to_excel(writer, sheet_name='Problem_Descriptions', index=False)
|
513 |
+
|
514 |
+
# # Ensure location_clusters and problem_clusters are in DataFrame format
|
515 |
+
# if isinstance(location_clusters, pd.DataFrame):
|
516 |
+
# location_clusters.to_excel(writer, sheet_name='Location_Clusters', index=False)
|
517 |
+
# else:
|
518 |
+
# console_messages.append("Converting Location Clusters to df")
|
519 |
+
# pd.DataFrame(location_clusters).to_excel(writer, sheet_name='Location_Clusters', index=False)
|
520 |
+
|
521 |
+
# if isinstance(problem_clusters, pd.DataFrame):
|
522 |
+
# problem_clusters.to_excel(writer, sheet_name='Problem_Clusters', index=False)
|
523 |
+
# else:
|
524 |
+
# console_messages.append("Converting Problem Clusters to df")
|
525 |
+
# pd.DataFrame(problem_clusters).to_excel(writer, sheet_name='Problem_Clusters', index=False)
|
526 |
|
527 |
|
528 |
|