Jan Mühlnikel
commited on
Commit
·
8f5db15
1
Parent(s):
14b1a2a
added selected project df
Browse files
modules/singlematch_result_table.py
CHANGED
@@ -3,24 +3,11 @@ import pandas as pd
|
|
3 |
|
4 |
def show_single_table(selected_project_index, projects_df, result_df):
|
5 |
|
6 |
-
st.write("------------------")
|
7 |
-
try:
|
8 |
-
projects_df["crs_3_code_list"] = [projects_df['crs_3_code'].item().split(";")[:-1]]
|
9 |
-
except:
|
10 |
-
projects_df["crs_3_code_list"] = [""]
|
11 |
-
|
12 |
-
try:
|
13 |
-
projects_df["crs_5_code_list"] = [projects_df['crs_5_code'].item().split(";")[:-1]]
|
14 |
-
except:
|
15 |
-
projects_df["crs_5_code_list"] = [""]
|
16 |
-
|
17 |
-
projects_df["sdg_list"] = [projects_df['sgd_pred_code'].item()]
|
18 |
|
19 |
sel_p_row = projects_df.iloc[selected_project_index].T
|
20 |
|
21 |
-
|
22 |
st.dataframe(
|
23 |
-
sel_p_row[["iati_id", "title_main", "orga_abbreviation", "client", "description_main", "country_name", "country_flag"
|
24 |
use_container_width = True,
|
25 |
height = 35 + 35 * len(sel_p_row),
|
26 |
column_config={
|
@@ -65,21 +52,6 @@ def show_single_table(selected_project_index, projects_df, result_df):
|
|
65 |
help="country flag",
|
66 |
width="small"
|
67 |
),
|
68 |
-
"sdg_list": st.column_config.ListColumn(
|
69 |
-
"SDG Prediction",
|
70 |
-
help="Prediction of SDG's",
|
71 |
-
width="small"
|
72 |
-
),
|
73 |
-
"crs_3_code_list": st.column_config.ListColumn(
|
74 |
-
"CRS 3",
|
75 |
-
help="CRS 3 code given by organization",
|
76 |
-
width="small"
|
77 |
-
),
|
78 |
-
"crs_5_code_list": st.column_config.ListColumn(
|
79 |
-
"CRS 5",
|
80 |
-
help="CRS 5 code given by organization",
|
81 |
-
width="small"
|
82 |
-
),
|
83 |
},
|
84 |
hide_index=True,
|
85 |
)
|
|
|
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].T
|
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,
|
12 |
height = 35 + 35 * len(sel_p_row),
|
13 |
column_config={
|
|
|
52 |
help="country flag",
|
53 |
width="small"
|
54 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
},
|
56 |
hide_index=True,
|
57 |
)
|