{"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":"26c94cd5-59e1-5985-9f4a-4003768e6180","task_key":"default--v0~2e1~2e0~5fhf--26c94cd5-59e1-5985-9f4a-4003768e6180","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 26c94cd5-59e1-5985-9f4a-4003768e6180","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import os\\nimport random\\nimport pandas as pd\\ndef task_func(data_dir,\\n          csv_files=['file1.csv', 'file2.csv', 'file3.csv'],\\n          seed=None):\\n\",\"complete_prompt\":\"import os\\nimport random\\nimport pandas as pd\\n\\n\\ndef task_func(data_dir,\\n          csv_files=['file1.csv', 'file2.csv', 'file3.csv'],\\n          seed=None):\\n    \\\"\\\"\\\"\\n    Randomly select one of the provided csv_files and select a certain number \\n    of records from the file at random.\\n    The selected records are returned in a DataFrame. \\n    The name of the selected csv_file is also returned.\\n\\n    If the csv_file is empty return an empty DataFrame.\\n\\n    Parameters:\\n    data_dir (str): The directory where the CSV files are located.\\n    csv_files (list of str): The list of CSV files to choose from. Default is ['file1.csv', 'file2.csv', 'file3.csv'].\\n    seed (int, optional): Seed for random number generation and for sampling from the csv.\\n    \\n    Returns:\\n    tuple: A tuple containing two elements:\\n        - str: The name of the randomly selected file.\\n        - DataFrame: A pandas DataFrame with the selected rows.\\n\\n    Requirements:\\n    - os\\n    - random\\n    - pandas\\n\\n    Example:\\n    >>> file_name, df = task_func('test_data')\\n    >>> print(file_name)\\n    'file2.csv'\\n    >>> print(df)\\n           Animal     Weight\\n     0        Cat          1\\n    21      Mouse         12\\n    15   Elephant       1000\\n     2      Tiger        500\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Randomly select one of the provided csv_files and select a certain number of records from the file at random. The selected records are returned in a DataFrame. The name of the selected csv_file is also returned. If the csv_file is empty return an empty DataFrame.\\nThe function should output with:\\n    tuple: A tuple containing two elements:\\n    str: The name of the randomly selected file.\\n    DataFrame: A pandas DataFrame with the selected rows.\\nYou should write self-contained code starting with:\\n```\\nimport os\\nimport random\\nimport pandas as pd\\ndef task_func(data_dir,\\n          csv_files=['file1.csv', 'file2.csv', 'file3.csv'],\\n          seed=None):\\n```\",\"libs\":\"['pandas', 'random', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}