{"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":"448695bb-d740-5b91-aa33-94069f08435e","task_key":"default--v0~2e1~2e0~5fhf--448695bb-d740-5b91-aa33-94069f08435e","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 448695bb-d740-5b91-aa33-94069f08435e","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport csv\\nimport random\\ndef task_func(\\n    n, \\n    countries=['USA', 'UK', 'China', 'India', 'Germany'], \\n    products=['Product A', 'Product B', 'Product C', 'Product D', 'Product E'], \\n    output_path=None,\\n    random_seed=None):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport csv\\nimport random\\n\\ndef task_func(\\n    n, \\n    countries=['USA', 'UK', 'China', 'India', 'Germany'], \\n    products=['Product A', 'Product B', 'Product C', 'Product D', 'Product E'], \\n    output_path=None,\\n    random_seed=None):\\n    \\\"\\\"\\\"\\n    Generate random sales data and return it as a pandas DataFrame.\\n    The sales data has the columns 'Country', 'Product' and 'Sales'.\\n    Country and Product get sampled from the provided lists / the default values.\\n    Sales is populated by generating random integers between 1 and 100.\\n    If an output_path is provided, the generated data is saved to a csv file.\\n\\n    Parameters:\\n    n (int): The number of sales records to generate.\\n    countries (list, optional): List of countries for sales data generation. Defaults to ['USA', 'UK', 'China', 'India', 'Germany'].\\n    products (list, optional): List of products for sales data generation. Defaults to ['Product A', 'Product B', 'Product C', 'Product D', 'Product E'].\\n    output_path (str, optional): Path to save the generated sales data as a CSV file. If not provided, the data will not be saved to a file.\\n    random_seed (int): Seed for rng. Used in generating the sales data. \\n\\n    Returns:\\n    DataFrame: A pandas DataFrame with the generated sales data.\\n\\n    Requirements:\\n    - pandas\\n    - csv\\n    - random\\n\\n    Example:\\n    >>> df = task_func(5, random_seed=1)\\n    >>> print(df)\\n      Country    Product  Sales\\n    0      UK  Product E     98\\n    1     USA  Product C     16\\n    2   India  Product D     61\\n    3   India  Product B     13\\n    4   India  Product A     50\\n\\n    >>> df = task_func(7, products=['tea', 'coffee'], countries=['Austria', 'Australia'], random_seed=12)\\n    >>> print(df)\\n         Country Product  Sales\\n    0  Australia  coffee     85\\n    1  Australia     tea     49\\n    2    Austria  coffee     62\\n    3  Australia  coffee     89\\n    4    Austria     tea     85\\n    5    Austria  coffee     48\\n    6    Austria  coffee     27\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate random sales data and return it as a pandas DataFrame. The sales data has the columns 'Country', 'Product' and 'Sales'. Country and Product get sampled from the provided lists / the default values. Sales is populated by generating random integers between 1 and 100. If an output_path is provided, the generated data is saved to a csv file. >>> df = task_func(7, products=['tea', 'coffee'], countries=['Austria', 'Australia'], random_seed=12) >>> print(df) Country Product  Sales 0  Australia  coffee     85 1  Australia     tea     49 2    Austria  coffee     62 3  Australia  coffee     89 4    Austria     tea     85 5    Austria  coffee     48 6    Austria  coffee     27\\nThe function should output with:\\n    DataFrame: A pandas DataFrame with the generated sales data.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport csv\\nimport random\\ndef task_func(\\n    n, \\n    countries=['USA', 'UK', 'China', 'India', 'Germany'], \\n    products=['Product A', 'Product B', 'Product C', 'Product D', 'Product E'], \\n    output_path=None,\\n    random_seed=None):\\n```\",\"libs\":\"['pandas', 'csv', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}