Update pages/demo_type_text.py
Browse files- pages/demo_type_text.py +10 -10
pages/demo_type_text.py
CHANGED
@@ -13,16 +13,16 @@ os.getenv("HF_TOKEN")
|
|
13 |
# st.session_state[k] = v
|
14 |
|
15 |
#st.title("📘Map internal description to SBS codes V2.0")
|
16 |
-
st.subheader("Select specific Chapter for quicker results")
|
17 |
-
df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows.csv")
|
18 |
|
19 |
-
startrowindex_list = df_chapters["from_row_index"].tolist()
|
20 |
-
endrowindex_list = df_chapters["to_row_index"].tolist()
|
21 |
-
allchapters_rows_list = []
|
22 |
-
for s, e in zip(startrowindex_list, endrowindex_list):
|
23 |
-
eachchapter_rows_list = list(range(s,e))
|
24 |
-
allchapters_rows_list.append(eachchapter_rows_list)
|
25 |
-
|
26 |
|
27 |
def dataframe_with_selections(df_chapters: pd.DataFrame, init_value: bool = False) -> pd.DataFrame:
|
28 |
df_with_selections = df_chapters.copy()
|
@@ -136,7 +136,7 @@ selected_rows_list = []
|
|
136 |
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", header=0, skip_blank_lines=False, skiprows = lambda x: x not in selected_rows_list)
|
137 |
|
138 |
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", index_col="SBS_Code", usecols=["Long_Description"]) # na_values=['NA']
|
139 |
-
df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", usecols=["SBS_Code_Hyphenated","Long_Description"])
|
140 |
from_row_index = 0 # Imaging services chapter start, adjust as needed
|
141 |
to_row_index = 10080 # Imaging services chapter end, adjust as needed
|
142 |
nrows = to_row_index - from_row_index + 1
|
|
|
13 |
# st.session_state[k] = v
|
14 |
|
15 |
#st.title("📘Map internal description to SBS codes V2.0")
|
16 |
+
#st.subheader("Select specific Chapter for quicker results")
|
17 |
+
#df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows.csv")
|
18 |
|
19 |
+
#startrowindex_list = df_chapters["from_row_index"].tolist()
|
20 |
+
#endrowindex_list = df_chapters["to_row_index"].tolist()
|
21 |
+
#allchapters_rows_list = []
|
22 |
+
#for s, e in zip(startrowindex_list, endrowindex_list):
|
23 |
+
# eachchapter_rows_list = list(range(s,e))
|
24 |
+
# allchapters_rows_list.append(eachchapter_rows_list)
|
25 |
+
#f_chapters['range_of_rows'] = allchapters_rows_list
|
26 |
|
27 |
def dataframe_with_selections(df_chapters: pd.DataFrame, init_value: bool = False) -> pd.DataFrame:
|
28 |
df_with_selections = df_chapters.copy()
|
|
|
136 |
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", header=0, skip_blank_lines=False, skiprows = lambda x: x not in selected_rows_list)
|
137 |
|
138 |
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", index_col="SBS_Code", usecols=["Long_Description"]) # na_values=['NA']
|
139 |
+
#df_SBS = pd.read_csv("SBS_V2_0/Code_Table.csv", usecols=["SBS_Code_Hyphenated","Long_Description"])
|
140 |
from_row_index = 0 # Imaging services chapter start, adjust as needed
|
141 |
to_row_index = 10080 # Imaging services chapter end, adjust as needed
|
142 |
nrows = to_row_index - from_row_index + 1
|