query_dataset
Run pandas code on a loaded dataset in a sandboxed subprocess to answer data questions and return the computed result.
Instructions
Run pandas code against a dataset in a restricted subprocess.
df, pd and np are preloaded. Do not import anything. Put the answer, as a string, in a variable called result.
Use f-strings (str.format is blocked). Example:
result = df.groupby('channel')['revenue'].sum().sort_values(ascending=False).head(5).to_string()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| name | Yes | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |