Spaces:
Running
Running
Zekun Wu
commited on
Commit
•
89aa4a2
1
Parent(s):
8f2e74d
update
Browse files- util/injection.py +3 -2
util/injection.py
CHANGED
@@ -131,8 +131,9 @@ def process_scores_multiple(df, num_run, parameters, privilege_label, protect_la
|
|
131 |
print(f"Processing category: {category}")
|
132 |
print(f"Scores: {scores[category]}")
|
133 |
|
134 |
-
# Ensure the scores are lists
|
135 |
-
|
|
|
136 |
|
137 |
# Debug: Check the Series after assignment
|
138 |
print(f"Series for {category}_Scores:\n{df[f'{category}_Scores']}")
|
|
|
131 |
print(f"Processing category: {category}")
|
132 |
print(f"Scores: {scores[category]}")
|
133 |
|
134 |
+
# Ensure the scores are lists and check before assignment
|
135 |
+
series_data = [lst if isinstance(lst, list) else [lst] for lst in scores[category]]
|
136 |
+
df[f'{category}_Scores'] = pd.Series(series_data)
|
137 |
|
138 |
# Debug: Check the Series after assignment
|
139 |
print(f"Series for {category}_Scores:\n{df[f'{category}_Scores']}")
|