{"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":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"eefb4ca0-f2e9-58e1-b992-8e83415fe4d7","task_key":"default--v0~2e1~2e0~5fhf--eefb4ca0-f2e9-58e1-b992-8e83415fe4d7","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf eefb4ca0-f2e9-58e1-b992-8e83415fe4d7","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport numpy as np\\ndef task_func(product_dict, product_keys):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport numpy as np\\n\\n\\ndef task_func(product_dict, product_keys):\\n    \\\"\\\"\\\"\\n    Create a profit report for a list of products based on a specific product dictionary that includes the quantity,\\n    price, and profit of each product. Additionally, calculate the average price and profit for all considered products,\\n    and plot a bar chart of the profit for each product.\\n\\n    Parameters:\\n    - product_dict (dict): The dictionary containing product details with product name as key and a list\\n    [quantity, price] as value.\\n    - product_keys (list): The list of product keys to consider for the report.\\n\\n    Returns: tuple: A tuple containing:\\n    - DataFrame: A pandas DataFrame with columns\\n    ['Product', 'Quantity', 'Price', 'Profit', 'Average Price', 'Average Profit'].\\n    - Axes: A matplotlib Axes object representing the plotted bar chart of profit for each product\\n    (None if no products).\\n\\n    Requirements:\\n    - pandas\\n    - numpy\\n\\n    Example:\\n    >>> product_dict = {'Apple': [100, 2.5], 'Orange': [80, 3.5], 'Banana': [120, 1.5]}\\n    >>> product_keys = ['Apple', 'Banana']\\n    >>> report, ax = task_func(product_dict, product_keys)\\n    >>> print(report)\\n      Product  Quantity  Price  Profit  Average Price  Average Profit\\n    0   Apple       100    2.5   250.0            2.0           215.0\\n    1  Banana       120    1.5   180.0            2.0           215.0\\n\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Create a profit report for a list of products based on a specific product dictionary that includes the quantity, price, and profit of each product. Additionally, calculate the average price and profit for all considered products, and plot a bar chart of the profit for each product.\\nThe function should output with:\\n    tuple: A tuple containing:\\n    DataFrame: A pandas DataFrame with columns\\n    ['Product', 'Quantity', 'Price', 'Profit', 'Average Price', 'Average Profit'].\\n    Axes: A matplotlib Axes object representing the plotted bar chart of profit for each product\\n    (None if no products).\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport numpy as np\\ndef task_func(product_dict, product_keys):\\n```\",\"libs\":\"['pandas', 'numpy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}