File size: 5,105 Bytes
9dcd3f9 f123b98 55a6bd8 f123b98 22386e0 55a6bd8 f123b98 55a6bd8 f123b98 22386e0 55a6bd8 f123b98 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
import streamlit as st
def show_table(p1_df, p2_df):
col1, col2 = st.columns([1, 1])
with col1:
st.write("------------------")
st.dataframe(
p1_df[["iati_id", "title_main", "orga_abbreviation", "client", "description_main", "country", "sgd_pred_code", "crs_3_code", "crs_5_code", "similarity"]],
use_container_width = True,
height = 35 + 35 * len(p1_df),
column_config={
"similarity": st.column_config.TextColumn(
"Similarity",
help="simialrity",
disabled=True
),
"iati_id": st.column_config.TextColumn(
"IATI ID",
help="IATI Project ID",
disabled=True
),
"orga_abbreviation": st.column_config.TextColumn(
"Organization",
help="If description not in English, description in other language provided",
disabled=True
),
"client": st.column_config.TextColumn(
"Client",
help="Client organization of customer",
disabled=True
),
"title_main": st.column_config.TextColumn(
"Title",
help="If title not in English, title in other language provided",
disabled=True
),
"description_main": st.column_config.TextColumn(
"Description",
help="If description not in English, description in other language provided",
disabled=True
),
"country": st.column_config.TextColumn(
"Country",
help="Country of project",
disabled=True
),
"sgd_pred_code": st.column_config.TextColumn(
"SDG Prediction",
help="Prediction of SDG's",
disabled=True
),
"crs_3_code": st.column_config.TextColumn(
"CRS 3",
help="CRS 3 code given by organization",
disabled=True
),
"crs_5_code": st.column_config.TextColumn(
"CRS 5",
help="CRS 5 code given by organization",
disabled=True
),
},
hide_index=True,
)
with col2:
st.write("------------------")
st.dataframe(
p2_df[["iati_id", "title_main", "orga_abbreviation", "client", "description_main", "country", "sgd_pred_code", "crs_3_code", "crs_5_code", "similarity"]],
use_container_width = True,
height = 35 + 35 * len(p2_df),
column_config={
"similarity": st.column_config.TextColumn(
"Similarity",
help="simialrity",
disabled=True
),
"iati_id": st.column_config.TextColumn(
"IATI ID",
help="IATI Project ID",
disabled=True
),
"orga_abbreviation": st.column_config.TextColumn(
"Organization",
help="If description not in English, description in other language provided",
disabled=True
),
"client": st.column_config.TextColumn(
"Client",
help="Client organization of customer",
disabled=True
),
"title_main": st.column_config.TextColumn(
"Title",
help="If title not in English, title in other language provided",
disabled=True
),
"description_main": st.column_config.TextColumn(
"Description",
help="If description not in English, description in other language provided",
disabled=True
),
"country": st.column_config.TextColumn(
"Country",
help="Country of project",
disabled=True
),
"sgd_pred_code": st.column_config.TextColumn(
"SDG Prediction",
help="Prediction of SDG's",
disabled=True
),
"crs_3_code": st.column_config.TextColumn(
"CRS 3",
help="CRS 3 code given by organization",
disabled=True
),
"crs_5_code": st.column_config.TextColumn(
"CRS 5",
help="CRS 5 code given by organization",
disabled=True
),
},
hide_index=True,
) |