{"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":"a053e316-19b4-57f7-9ea5-b852f186d9fa","task_key":"default--v0~2e1~2e0~5fhf--a053e316-19b4-57f7-9ea5-b852f186d9fa","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a053e316-19b4-57f7-9ea5-b852f186d9fa","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom scipy import stats\\nimport matplotlib.pyplot as plt\\nTARGET_VALUES = np.array([1, 3, 4])\\ndef task_func(df):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom scipy import stats\\nimport matplotlib.pyplot as plt\\n\\nTARGET_VALUES = np.array([1, 3, 4])\\n\\ndef task_func(df):\\n    \\\"\\\"\\\"\\n    Replace all elements in DataFrame columns that do not exist in the TARGET_VALUES array with zeros, then perform a Box-Cox transformation on each column (if data is not constant, add 1 to account for zeros) and display the resulting KDE plots.\\n\\n    Parameters:\\n        - df (pandas.DataFrame): The input pandas DataFrame with positive values.\\n\\n    Returns:\\n        - pandas.DataFrame: The transformed DataFrame after Box-Cox transformation.\\n        - matplotlib.figure.Figure: Figure containing KDE plots of the transformed columns.\\n\\n    Requirements:\\n    - numpy\\n    - scipy.stats\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> np.random.seed(42)\\n    >>> df = pd.DataFrame(np.random.randint(1, 10, size=(100, 5)), columns=list('ABCDE'))  # Values should be positive for Box-Cox\\n    >>> transformed_df, fig = task_func(df)\\n    >>> print(transformed_df.head(2))\\n              A         B    C    D         E\\n    0  0.000000  0.566735  0.0  0.0  0.000000\\n    1  0.530493  0.000000  0.0  0.0  0.607007\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Replace all elements in DataFrame columns that do not exist in the TARGET_VALUES array with zeros, then perform a Box-Cox transformation on each column (if data is not constant, add 1 to account for zeros) and display the resulting KDE plots.\\nThe function should output with:\\n    pandas.DataFrame: The transformed DataFrame after Box-Cox transformation.\\n    matplotlib.figure.Figure: Figure containing KDE plots of the transformed columns.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom scipy import stats\\nimport matplotlib.pyplot as plt\\nTARGET_VALUES = np.array([1, 3, 4])\\ndef task_func(df):\\n```\",\"libs\":\"['numpy', 'matplotlib', 'scipy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}