faizhalas commited on
Commit
eaef838
·
verified ·
1 Parent(s): 24385b9

Update Home.py

Browse files
Files changed (1) hide show
  1. Home.py +3 -3
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[selected_cols].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)
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