{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"ds-1000","formal_name":"DS-1000","introduction":"DS-1000 builds 1,000 data-science problems from real StackOverflow questions across seven libraries including NumPy, Pandas and Matplotlib. The problems are perturbed so that recalling the original answer does not solve them.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://ds1000-code-gen.github.io/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"9fa2f786-e7ca-53c1-beff-12a273a35c83","task_key":"default--test--111","task_revision_id":"2","upstream_id":"111","short_description":"I have an example data as:","config":"default","split":"test","body":"{\"prompt\":\"Problem:\\nI have an example data as:\\ndatetime             col1    col2    col3\\n2021-04-10 01:00:00    25.    50.     50\\n2021-04-10 02:00:00.   25.    50.     50\\n2021-04-10 03:00:00.   25.    100.    50\\n2021-04-10 04:00:00    50.     50.    100\\n2021-04-10 05:00:00.   100.    100.   100\\n\\n\\nI want to create a new column called state, which returns col1 value if col2 and col3 values are  more than 50 otherwise returns the sum value of col1,column2 and column3.\\nThe expected output is as shown below:\\n             datetime  col1  col2  col3  state\\n0 2021-04-10 01:00:00    25    50    50    125\\n1 2021-04-10 02:00:00    25    50    50    125\\n2 2021-04-10 03:00:00    25   100    50    175\\n3 2021-04-10 04:00:00    50    50   100    200\\n4 2021-04-10 05:00:00   100   100   100    100\\n\\n\\nA:\\n<code>\\nimport pandas as pd\\n\\n\\ndf = pd.DataFrame({'datetime': ['2021-04-10 01:00:00', '2021-04-10 02:00:00', '2021-04-10 03:00:00', '2021-04-10 04:00:00', '2021-04-10 05:00:00'],\\n                   'col1': [25, 25, 25, 50, 100],\\n                   'col2': [50, 50, 100, 50, 100],\\n                   'col3': [50, 50, 50, 100, 100]})\\n\\n\\ndf['datetime'] = pd.to_datetime(df['datetime'])\\n</code>\\ndf = ... # put solution in this variable\\nBEGIN SOLUTION\\n<code>\\n\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://ds1000-code-gen.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}