{"task": {"agent_timeout": 1800, "task": "272", "verifier_timeout": 1800, "instruction": "# 272: DS-1000 Task\n\n## Prompt\nProblem:\npandas version: 1.2\nI have a dataframe that columns as 'float64' with null values represented as pd.NAN. Is there way to round without converting to string then decimal:\ndf = pd.DataFrame([(.21, .3212), (.01, .61237), (.66123, pd.NA), (.21, .18),(pd.NA, .18)],\n                  columns=['dogs', 'cats'])\ndf\n      dogs     cats\n0     0.21  0.32120\n1     0.01  0.61237\n2  0.66123     <NA>\n3     0.21  0.18000\n4     <NA>  0.188\n\n\nFor rows without pd.NAN, here is what I wanted to do, but it is erroring:\ndf['dogs'] = df['dogs'].round(2)\ndf['cats'] = df['cats'].round(2)\n\n\nTypeError: float() argument must be a string or a number, not 'NAType'\n\n\nHere is my desired output:\n      dogs   cats\n0     0.21   0.32\n1     0.01   0.61\n2  0.66123   <NA>\n3     0.21   0.18\n4     <NA>  0.188\n\n\n\n\nA:\n<code>\nimport pandas as pd\n\n\ndf = pd.DataFrame([(.21, .3212), (.01, .61237), (.66123, pd.NA), (.21, .18),(pd.NA, .188)],\n                  columns=['dogs', 'cats'])\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": []}