# BigCodeBench / 

task_id: 941bb0d7-9785-5cce-aa71-2e59c6284d9f
task_key: default--v0~2e1~2e0~5fhf--941bb0d7-9785-5cce-aa71-2e59c6284d9f
task_revision_id: 1

{"code_prompt":"import pandas as pd\nimport numpy as np\ndef task_func(column, data):\n","complete_prompt":"import pandas as pd\nimport numpy as np\n\n\ndef task_func(column, data):\n    \"\"\"\n    Analyzes a list of stock data and calculates the sum, mean, minimum, and maximum\n    values for a specified column.\n\n    Parameters:\n    - column (str): The name of the column to analyze. Valid options are 'Date', 'Open', 'High',\n                    'Low', 'Close', and 'Volume'.\n    - data (list of lists): A list where each element is a list representing stock data for a single day.\n                            Each inner list should contain values in the following order:\n                            'Date', 'Open', 'High', 'Low', 'Close', 'Volume'.\n    Returns:\n    - dict: A dictionary containing the calculated 'sum', 'mean', 'min' (minimum), and 'max' (maximum)\n            for the specified column. If the input data is empty, 'sum' will be 0, and 'mean', 'min', and\n            'max' will be NaN.\n\n    Requirements:\n    - pandas\n    - numpy\n\n    Raises:\n    - ValueError: If the specified column name is not valid.\n    \n    Example:\n    >>> data = [[datetime(2022, 1, 1), 100, 105, 95, 102, 10000]]\n    >>> results = task_func('Open', data)\n    >>> results\n    {'sum': 100, 'mean': 100.0, 'min': 100, 'max': 100}\n    >>> type(results)\n    <class 'dict'>\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Analyzes a list of stock data and calculates the sum, mean, minimum, and maximum values for a specified column.\nThe function should raise the exception for: ValueError: If the specified column name is not valid.\nThe function should output with:\n    dict: A dictionary containing the calculated 'sum', 'mean', 'min' (minimum), and 'max' (maximum)\n    for the specified column. If the input data is empty, 'sum' will be 0, and 'mean', 'min', and\n    'max' will be NaN.\nYou should write self-contained code starting with:\n```\nimport pandas as pd\nimport numpy as np\ndef task_func(column, data):\n```","libs":"['pandas', 'numpy']"}

Source: https://bigcode-bench.github.io/

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=941bb0d7-9785-5cce-aa71-2e59c6284d9f&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
