Jan Mühlnikel
commited on
Commit
·
cf7a437
1
Parent(s):
c7e24a4
text instead of codes as crs
Browse files
modules/singlematch_result_table.py
CHANGED
@@ -3,10 +3,10 @@ import pandas as pd
|
|
3 |
|
4 |
def show_single_table(selected_project_index, projects_df, result_df):
|
5 |
|
6 |
-
result_df['crs_3_code_list'] = result_df['
|
7 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
8 |
)
|
9 |
-
result_df['crs_5_code_list'] = result_df['
|
10 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
11 |
)
|
12 |
result_df['sdg_list'] = result_df['sgd_pred_code'].apply(
|
@@ -15,10 +15,10 @@ def show_single_table(selected_project_index, projects_df, result_df):
|
|
15 |
|
16 |
sel_p_row = projects_df.iloc[[selected_project_index]]
|
17 |
|
18 |
-
sel_p_row['crs_3_code_list'] = sel_p_row['
|
19 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
20 |
)
|
21 |
-
sel_p_row['crs_5_code_list'] = sel_p_row['
|
22 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
23 |
)
|
24 |
sel_p_row['sdg_list'] = sel_p_row['sgd_pred_code'].apply(
|
|
|
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_name'].apply(
|
7 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
8 |
)
|
9 |
+
result_df['crs_5_code_list'] = result_df['crs_5_name'].apply(
|
10 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
11 |
)
|
12 |
result_df['sdg_list'] = result_df['sgd_pred_code'].apply(
|
|
|
15 |
|
16 |
sel_p_row = projects_df.iloc[[selected_project_index]]
|
17 |
|
18 |
+
sel_p_row['crs_3_code_list'] = sel_p_row['crs_3_name'].apply(
|
19 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
20 |
)
|
21 |
+
sel_p_row['crs_5_code_list'] = sel_p_row['crs_5_name'].apply(
|
22 |
lambda x: [""] if x is None else (str(x).split(";")[:-1] if str(x).endswith(";") else str(x).split(";")[:-1])
|
23 |
)
|
24 |
sel_p_row['sdg_list'] = sel_p_row['sgd_pred_code'].apply(
|