Update Home.py
Browse files
Home.py
CHANGED
|
@@ -66,15 +66,15 @@ if text_search is not None:
|
|
| 66 |
#column_result = df[np.logical_and.reduce(conditions)]
|
| 67 |
#key_df_j = pd.concat([key_df_j, column_result]).drop_duplicates()
|
| 68 |
@st.cache_data
|
| 69 |
-
def search_data(text_search):
|
| 70 |
key_df_j = df
|
| 71 |
-
key_df_j["__combined__"] = key_df_j[
|
| 72 |
query = Query(text_search, ignore_case=True)
|
| 73 |
key_df_j["df_result"] = key_df_j["__combined__"].apply(query)
|
| 74 |
|
| 75 |
return key_df_j
|
| 76 |
|
| 77 |
-
key_df_j = search_data(text_search)
|
| 78 |
st.write(key_df_j)
|
| 79 |
|
| 80 |
# creating result
|
|
|
|
| 66 |
#column_result = df[np.logical_and.reduce(conditions)]
|
| 67 |
#key_df_j = pd.concat([key_df_j, column_result]).drop_duplicates()
|
| 68 |
@st.cache_data
|
| 69 |
+
def search_data(text_search, search_opt):
|
| 70 |
key_df_j = df
|
| 71 |
+
key_df_j["__combined__"] = key_df_j[search_opt].fillna("").agg(" ".join, axis=1)
|
| 72 |
query = Query(text_search, ignore_case=True)
|
| 73 |
key_df_j["df_result"] = key_df_j["__combined__"].apply(query)
|
| 74 |
|
| 75 |
return key_df_j
|
| 76 |
|
| 77 |
+
key_df_j = search_data(text_search, search_opt)
|
| 78 |
st.write(key_df_j)
|
| 79 |
|
| 80 |
# creating result
|