{"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":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"b4189d50-192b-593c-ac5a-7e593056674e","task_key":"default--v0~2e1~2e0~5fhf--b4189d50-192b-593c-ac5a-7e593056674e","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf b4189d50-192b-593c-ac5a-7e593056674e","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nimport pandas as pd\\nimport numpy as np\\n# Constants\\nDATA_PATTERN = r'>\\\\d+\\\\.\\\\d+<'\\ndef task_func(dataframe, data_pattern=DATA_PATTERN):\\n\",\"complete_prompt\":\"import re\\nimport pandas as pd\\nimport numpy as np\\n# Constants\\nDATA_PATTERN = r'>\\\\d+\\\\.\\\\d+<'\\n\\n\\ndef task_func(dataframe, data_pattern=DATA_PATTERN):\\n    \\\"\\\"\\\"\\n    Extract numeric data from a Pandas DataFrame based on a specific pattern. The function searches \\n    each cell for occurrences of the regex pattern '>number<number>' (e.g., '>1.23<') and replaces \\n    the cell content with the extracted numeric value. If no match is found, the cell is replaced with NaN.\\n    \\n    Parameters:\\n    - dataframe (pd.DataFrame): A pandas DataFrame containing data to be processed.\\n    - data_pattern (str, optional): data search pattern. Default value is '>\\\\d+\\\\.\\\\d+<'.\\n    \\n    Returns:\\n    - pd.DataFrame: A modified DataFrame with cells containing the extracted numeric values or NaN.\\n    \\n    Requirements:\\n    - re\\n    - pandas\\n    - numpy\\n    \\n    Example:\\n    >>> import pandas as pd\\n    >>> df = pd.DataFrame({'A': ['>1.23<', '>4.56<'], 'B': ['>7.89<', '>0.12<']})\\n    >>> task_func(df)\\n          A     B\\n    0  1.23  7.89\\n    1  4.56  0.12\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Extract numeric data from a Pandas DataFrame based on a specific pattern. The function searches each cell for occurrences of the regex pattern '>number<number>' (e.g., '>1.23<') and replaces the cell content with the extracted numeric value. If no match is found, the cell is replaced with NaN.\\nThe function should output with:\\n    pd.DataFrame: A modified DataFrame with cells containing the extracted numeric values or NaN.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nimport pandas as pd\\nimport numpy as np\\n# Constants\\nDATA_PATTERN = r'>\\\\d+\\\\.\\\\d+<'\\ndef task_func(dataframe, data_pattern=DATA_PATTERN):\\n```\",\"libs\":\"['pandas', 'numpy', 're']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}