{"task": {"agent_timeout": 1800, "task": "922", "verifier_timeout": 1800, "instruction": "# 922: DS-1000 Task\n\n## Prompt\nProblem:\n\nI have a data which include dates in sorted order.\n\nI would like to split the given data to train and test set. However, I must to split the data in a way that the test have to be older than the train set.\n\nPlease look at the given example:\n\nLet's assume that we have data by dates:\n\n1, 2, 3, ..., n.\n\nThe numbers from 1 to n represents the days.\n\nI would like to split it to 80% from the data to be train set and 20% of the data to be test set.\n\nGood results:\n\n1) train set = 21, ..., 100\n\n   test set = 1, 2, 3, ..., 20\n\n\n2) train set = 121, ... 200\n\n    test set = 101, 102, ... 120\nMy code:\n\ntrain_size = 0.8\ntrain_dataframe, test_dataframe = cross_validation.train_test_split(features_dataframe, train_size=train_size)\n\ntrain_dataframe = train_dataframe.sort([\"date\"])\ntest_dataframe = test_dataframe.sort([\"date\"])\nDoes not work for me!\n\nAny suggestions?\n\nA:\n\n<code>\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfeatures_dataframe = load_data()\n</code>\ntrain_dataframe, test_dataframe = ... # put solution in these variables\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": []}