{"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":"30f0531d-f3cd-5706-9ed5-c4fc55bfbee9","task_key":"default--v0~2e1~2e0~5fhf--30f0531d-f3cd-5706-9ed5-c4fc55bfbee9","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 30f0531d-f3cd-5706-9ed5-c4fc55bfbee9","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import requests\\nimport pandas as pd\\ndef task_func(url: str) -> pd.DataFrame:\\n\",\"complete_prompt\":\"import requests\\nimport pandas as pd\\n\\n\\ndef task_func(url: str) -> pd.DataFrame:\\n    \\\"\\\"\\\"\\n    This function fetches JSON data from a specified URL and converts it into a Pandas DataFrame.\\n    It expects the JSON to be in a format that is directly convertible to a DataFrame, typically\\n    a list of dictionaries. The function handles various scenarios including successful data\\n    retrieval and conversion, network issues, and invalid JSON format.\\n\\n    Parameters:\\n    - url (str): The URL where the JSON file is located.\\n\\n    Returns:\\n    - pd.DataFrame: A DataFrame constructed from the JSON data fetched from the URL.\\n\\n    Raises:\\n    - SystemError: If there is a network-related issue such as a connection error, timeout,\\n      or if the server responded with an unsuccessful status code (like 404 or 500). This is a\\n      re-raised exception from requests.RequestException to provide a more specific error message.\\n    - ValueError: If the fetched data is not in a valid JSON format that can be converted into\\n      a DataFrame. This could occur if the data structure does not match the expected format (e.g.,\\n      not a list of dictionaries).\\n\\n    Requirements:\\n    - requests\\n    - pandas\\n\\n    Example:\\n    >>> task_func('https://example.com/data.json')\\n    DataFrame:\\n       A  B\\n\\n    Notes:\\n    - The function uses a timeout of 5 seconds for the network request to avoid hanging indefinitely.\\n    - It checks the HTTP response status and raises an HTTPError for unsuccessful status codes.\\n    - Directly converts the HTTP response to JSON and then to a DataFrame, without intermediate processing.\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"This function fetches JSON data from a specified URL and converts it into a Pandas DataFrame. It expects the JSON to be in a format that is directly convertible to a DataFrame, typically a list of dictionaries. The function handles various scenarios including successful data retrieval and conversion, network issues, and invalid JSON format.\\nNote that: Notes: The function uses a timeout of 5 seconds for the network request to avoid hanging indefinitely. It checks the HTTP response status and raises an HTTPError for unsuccessful status codes. Directly converts the HTTP response to JSON and then to a DataFrame, without intermediate processing.\\nThe function should raise the exception for: SystemError: If there is a network-related issue such as a connection error, timeout, or if the server responded with an unsuccessful status code (like 404 or 500). This is a re-raised exception from requests.RequestException to provide a more specific error message. ValueError: If the fetched data is not in a valid JSON format that can be converted into a DataFrame. This could occur if the data structure does not match the expected format (e.g., not a list of dictionaries).\\nThe function should output with:\\n    pd.DataFrame: A DataFrame constructed from the JSON data fetched from the URL.\\nYou should write self-contained code starting with:\\n```\\nimport requests\\nimport pandas as pd\\ndef task_func(url: str) -> pd.DataFrame:\\n```\",\"libs\":\"['pandas', 'requests']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}