Zekun Wu commited on
Commit
e845a55
1 Parent(s): 09c5f1e
Files changed (1) hide show
  1. util/injection.py +2 -0
util/injection.py CHANGED
@@ -127,3 +127,5 @@ def process_scores_multiple(df, num_run, parameters, privilege_label, protect_la
127
  for category in ['Privilege_characteristics', 'Privilege_normal','Protect_characteristics', 'Protect_normal','Neutral_characteristics', 'Neutral_normal']:
128
  df[f'{category}_Scores'] = pd.Series([lst if isinstance(lst, list) else [] for lst in scores[category]])
129
  df[f'{category}_Avg_Score'] = df[f'{category}_Scores'].apply(calculate_avg_score)
 
 
 
127
  for category in ['Privilege_characteristics', 'Privilege_normal','Protect_characteristics', 'Protect_normal','Neutral_characteristics', 'Neutral_normal']:
128
  df[f'{category}_Scores'] = pd.Series([lst if isinstance(lst, list) else [] for lst in scores[category]])
129
  df[f'{category}_Avg_Score'] = df[f'{category}_Scores'].apply(calculate_avg_score)
130
+
131
+ return df