{"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":"cf88713f-3931-5270-b2d7-03bc103db951","task_key":"default--v0~2e1~2e0~5fhf--cf88713f-3931-5270-b2d7-03bc103db951","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf cf88713f-3931-5270-b2d7-03bc103db951","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nimport os\\nimport glob\\nimport natsort\\nimport pandas as pd\\ndef task_func(directory='./', file_pattern='*.txt', regex=r'([0-9]+)'):\\n\",\"complete_prompt\":\"import re\\nimport os\\nimport glob\\nimport natsort\\nimport pandas as pd\\n\\ndef task_func(directory='./', file_pattern='*.txt', regex=r'([0-9]+)'):\\n    \\\"\\\"\\\"\\n    Extract numeric data from all text files matching a given pattern in a directory and compile it into a Pandas DataFrame.\\n\\n    Parameters:\\n    - directory (str): The directory to search for text files. Default is './'.\\n    - file_pattern (str): The glob pattern to match text files. Default is '*.txt'.\\n    - regex (str): The regular expression used to extract numeric data. Default is r'([0-9]+)'.\\n\\n    Returns:\\n    - DataFrame: A pandas DataFrame with two columns: 'Filename' and 'Numeric Data'. Each row represents a file and its extracted numeric data.\\n\\n    Raises:\\n    - FileNotFoundError: If the specified directory does not exist.\\n    - ValueError: If no files matching the pattern are found.\\n\\n    Requirements:\\n    - re\\n    - os\\n    - glob\\n    - natsort\\n    - pandas\\n\\n    Example:\\n    >>> data_dir = './data/'\\n    >>> create_dummy_files(data_dir)\\n    >>> df = task_func('./data/', '*.txt', r'([0-9]+)')\\n    >>> tear_down_files(data_dir)\\n    >>> print(df)\\n              Filename Numeric Data\\n    0        empty.txt           []\\n    1        file1.txt   [123, 456]\\n    2        file2.txt        [789]\\n    3        mixed.txt   [123, 456]\\n    4  non_numeric.txt           []\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Extract numeric data from all text files matching a given pattern in a directory and compile it into a Pandas DataFrame.\\nThe function should raise the exception for: FileNotFoundError: If the specified directory does not exist. ValueError: If no files matching the pattern are found.\\nThe function should output with:\\n    DataFrame: A pandas DataFrame with two columns: 'Filename' and 'Numeric Data'. Each row represents a file and its extracted numeric data.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nimport os\\nimport glob\\nimport natsort\\nimport pandas as pd\\ndef task_func(directory='./', file_pattern='*.txt', regex=r'([0-9]+)'):\\n```\",\"libs\":\"['glob', 'pandas', 'natsort', 'os', 're']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}