{"task": {"agent_timeout": 1800, "task": "275", "verifier_timeout": 1800, "instruction": "# 275: DS-1000 Task\n\n## Prompt\nProblem:\nI do know some posts are quite similar to my question but none of them succeded in giving me the correct answer. I want, for each row of a pandas dataframe, to perform the average of values taken from several columns. As the number of columns tends to vary, I want this average to be performed from a list of columns.\nAt the moment my code looks like this:\ndf[Avg] = df['Col A'] + df['Col E'] + df['Col Z']\n\n\nI want it to be something like :\ndf['Avg'] = avg(list_of_my_columns)\n\n\nor\ndf[list_of_my_columns].avg(axis=1)\n\n\nBut both of them return an error. Might be because my list isn't properly created? This is how I did it:\nlist_of_my_columns = [df['Col A'], df['Col E'], df['Col Z']]\n\n\nBut this doesn't seem to work... \nThen I want to get df['Min'], df['Max'] and df['Median']] using similar operation.\nAny ideas ? Thank you !\n\n\nA:\n<code>\nimport pandas as pd\nimport numpy as np\n\n\nnp.random.seed(10)\ndata = {}\nfor i in [chr(x) for x in range(65,91)]:\n    data['Col '+i] = np.random.randint(1,100,10)\ndf = pd.DataFrame(data)\nlist_of_my_columns = ['Col A', 'Col E', 'Col Z']\n</code>\ndf = ... # put solution in this variable\nBEGIN SOLUTION\n<code>\n\n## What to do\n- Edit `solution/solution.py` so the code passes the DS-1000 tests.\n- Do not access the internet or install new packages; required libraries are preinstalled in the Docker image.\n- Run tests locally via `bash tests/test.sh`.\n\n## Notes\n- Keep the variable names/signatures implied by the prompt/code_context.\n- The evaluator uses the original DS-1000 `code_context` (`test_execution` / `test_string`).\n", "memory": "", "runnable": false, "difficulty": "", "language": "", "cpus": "", "instruction_truncated": false, "category": "", "compose": false, "has_solution": true, "oracle": null, "docker_image": "ds1000:latest", "taskset": "ds1000", "tags": []}, "runs": []}