Update processor.py
Browse files- processor.py +1 -1
processor.py
CHANGED
|
@@ -290,7 +290,6 @@ class DatasetCommandCenter:
|
|
| 290 |
)
|
| 291 |
|
| 292 |
elif t_type == 'python':
|
| 293 |
-
# Lazy Context Creation: Only pay the cost if used
|
| 294 |
if eval_context is None:
|
| 295 |
eval_context = row.copy()
|
| 296 |
eval_context['row'] = row
|
|
@@ -298,6 +297,7 @@ class DatasetCommandCenter:
|
|
| 298 |
eval_context['re'] = re
|
| 299 |
eval_context['requests'] = requests
|
| 300 |
|
|
|
|
| 301 |
val = eval(col_def['expression'], {}, eval_context)
|
| 302 |
new_row[target_col] = val
|
| 303 |
|
|
|
|
| 290 |
)
|
| 291 |
|
| 292 |
elif t_type == 'python':
|
|
|
|
| 293 |
if eval_context is None:
|
| 294 |
eval_context = row.copy()
|
| 295 |
eval_context['row'] = row
|
|
|
|
| 297 |
eval_context['re'] = re
|
| 298 |
eval_context['requests'] = requests
|
| 299 |
|
| 300 |
+
# This evaluates the ENTIRE expression as Python
|
| 301 |
val = eval(col_def['expression'], {}, eval_context)
|
| 302 |
new_row[target_col] = val
|
| 303 |
|