bradley6597 commited on
Commit
7305380
1 Parent(s): ef89f97

Group parent ids

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -137,7 +137,7 @@ def search_index(search_text, sd, ks, sort_by, max_results, user_num, search_tit
137
  output_df['missing_desc'] = np.where(output_df['abstract'].str.contains('eyfs|ks1|ks2', regex = True), 0, 1)
138
  output_df2 = output_df
139
  output_df2['ind'] = output_df2.index
140
- min_parent_score = output_df2.groupby('parent_id')['ind'].min().reset_index()
141
  min_parent_score.columns = ['parent_id', 'min_parent_ind']
142
  output_df2 = output_df2.merge(min_parent_score, how = 'left', on = 'parent_id')
143
 
 
137
  output_df['missing_desc'] = np.where(output_df['abstract'].str.contains('eyfs|ks1|ks2', regex = True), 0, 1)
138
  output_df2 = output_df
139
  output_df2['ind'] = output_df2.index
140
+ min_parent_score = output_df2.groupby('parent_id')['ind'].min().reset_index()
141
  min_parent_score.columns = ['parent_id', 'min_parent_ind']
142
  output_df2 = output_df2.merge(min_parent_score, how = 'left', on = 'parent_id')
143