Jan Mühlnikel
commited on
Commit
·
5dbafb0
1
Parent(s):
4bcd90c
added crs to resultb table
Browse files
modules/singlematch_result_table.py
CHANGED
|
@@ -3,9 +3,16 @@ import pandas as pd
|
|
| 3 |
|
| 4 |
def show_single_table(selected_project_index, projects_df, result_df):
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
sel_p_row = projects_df.iloc[[selected_project_index]]
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
st.dataframe(
|
| 10 |
sel_p_row[["iati_id", "title_main", "orga_abbreviation", "client", "description_main", "country_name", "country_flag"]],
|
| 11 |
use_container_width = True,
|
|
|
|
| 3 |
|
| 4 |
def show_single_table(selected_project_index, projects_df, result_df):
|
| 5 |
|
| 6 |
+
result_df['crs_3_code_list'] = result_df['crs_3_code'].apply(lambda x: x.split(";")[:-1] if x.endswith(";") else x.split(";"))
|
| 7 |
+
result_df['crs_5_code_list'] = result_df['crs_5_code'].apply(lambda x: x.split(";")[:-1] if x.endswith(";") else x.split(";"))
|
| 8 |
+
result_df['sdg_list'] = result_df['sgd_pred_code'].apply(lambda x: x.split(";")[:-1] if x.endswith(";") else x.split(";"))
|
| 9 |
|
| 10 |
sel_p_row = projects_df.iloc[[selected_project_index]]
|
| 11 |
|
| 12 |
+
sel_p_row['crs_3_code_list'] = sel_p_row['crs_3_code'].apply(lambda x: x.split(";")[:-1] if x.endswith(";") else x.split(";"))
|
| 13 |
+
sel_p_row['crs_5_code_list'] = sel_p_row['crs_5_code'].apply(lambda x: x.split(";")[:-1] if x.endswith(";") else x.split(";"))
|
| 14 |
+
sel_p_row['sdg_list'] = sel_p_row['sgd_pred_code'].apply(lambda x: x.split(";")[:-1] if x.endswith(";") else x.split(";"))
|
| 15 |
+
|
| 16 |
st.dataframe(
|
| 17 |
sel_p_row[["iati_id", "title_main", "orga_abbreviation", "client", "description_main", "country_name", "country_flag"]],
|
| 18 |
use_container_width = True,
|
similarity_page.py
CHANGED
|
@@ -329,7 +329,7 @@ def show_single_matching_page():
|
|
| 329 |
COUNTRY_OPTION_LIST,
|
| 330 |
placeholder="All countries selected "
|
| 331 |
)
|
| 332 |
-
|
| 333 |
st.write("--------------")
|
| 334 |
|
| 335 |
#selected_index = None
|
|
|
|
| 329 |
COUNTRY_OPTION_LIST,
|
| 330 |
placeholder="All countries selected "
|
| 331 |
)
|
| 332 |
+
|
| 333 |
st.write("--------------")
|
| 334 |
|
| 335 |
#selected_index = None
|