{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"f5ddffb7-e0e9-5b5f-8526-5d20988fad5f","task_key":"default--v0~2e1~2e0~5fhf--f5ddffb7-e0e9-5b5f-8526-5d20988fad5f","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f5ddffb7-e0e9-5b5f-8526-5d20988fad5f","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport seaborn as sns\\nfrom scipy import stats\\n# Constants\\nCOLUMN_NAMES = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']\\ndef task_func(data):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport seaborn as sns\\nfrom scipy import stats\\n\\n# Constants\\nCOLUMN_NAMES = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']\\n\\n\\ndef task_func(data):\\n    \\\"\\\"\\\"\\n    Processes a given dataset to compute the average of each row, plots the distribution of these averages,\\n    and evaluates their normality. The function returns these averages as an additional column in a DataFrame,\\n    the plot of the distribution, and the p-value from the normality test if applicable.\\n\\n    Parameters:\\n    data (numpy.array): A 2D numpy array with eight columns representing different data types or categories, with a\\n    shape of (n_samples, 8).\\n\\n    Returns:\\n    tuple: Contains three elements:\\n        - DataFrame: A pandas DataFrame with the original data and an added 'Average' column.\\n        - Axes object: The Axes object from the seaborn distribution plot of the averages.\\n        - float or None: The p-value from the normality test on the averages, or None\\n        if the test could not be conducted.\\n\\n    Requirements:\\n    - pandas\\n    - seaborn\\n    - scipy\\n\\n    Raises:\\n    ValueError: If the input data does not have exactly eight columns.\\n\\n    Note:\\n    The function uses seaborn's distplot for visualization and scipy's normaltest for statistical analysis.\\n    It requires at least 20 data points to perform the normality test.\\n\\n    Example:\\n    >>> import numpy as np\\n    >>> data = np.array([[1, 2, 3, 4, 4, 3, 7, 1], [6, 2, 3, 4, 3, 4, 4, 1]])\\n    >>> df, ax, p_value = task_func(data)\\n    >>> print(df)\\n       A  B  C  D  E  F  G  H  Average\\n    0  1  2  3  4  4  3  7  1    3.125\\n    1  6  2  3  4  3  4  4  1    3.375\\n    >>> print(p_value)\\n    None\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Processes a given dataset to compute the average of each row, plots the distribution of these averages, and evaluates their normality. The function returns these averages as an additional column in a DataFrame, the plot of the distribution, and the p-value from the normality test if applicable.\\nNote that: The function uses seaborn's distplot for visualization and scipy's normaltest for statistical analysis. It requires at least 20 data points to perform the normality test.\\nThe function should raise the exception for: ValueError: If the input data does not have exactly eight columns.\\nThe function should output with:\\n    tuple: Contains three elements:\\n    DataFrame: A pandas DataFrame with the original data and an added 'Average' column.\\n    Axes object: The Axes object from the seaborn distribution plot of the averages.\\n    float or None: The p-value from the normality test on the averages, or None\\n    if the test could not be conducted.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport seaborn as sns\\nfrom scipy import stats\\n# Constants\\nCOLUMN_NAMES = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']\\ndef task_func(data):\\n```\",\"libs\":\"['pandas', 'scipy', 'seaborn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}