{"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":"18befc38-1a31-52b3-a3d4-748ce1dab7cf","task_key":"default--v0~2e1~2e0~5fhf--18befc38-1a31-52b3-a3d4-748ce1dab7cf","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 18befc38-1a31-52b3-a3d4-748ce1dab7cf","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport matplotlib.pyplot as plt\\n# Constants for pie chart colors\\nCOLORS = ['r', 'g', 'b', 'y', 'm']\\ndef task_func(df, col, title=None):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport matplotlib.pyplot as plt\\n\\n# Constants for pie chart colors\\nCOLORS = ['r', 'g', 'b', 'y', 'm']\\n\\ndef task_func(df, col, title=None):\\n    \\\"\\\"\\\"\\n    Draw a pie chart of the number of unique values in a given DataFrame column with an optional title.\\n\\n    Parameters:\\n    - df (DataFrame): The input DataFrame containing the data.\\n    - col (str): The column name for which the pie chart is to be plotted.\\n    - title (str, optional): The title of the pie chart. If None, no title is set.\\n\\n    Returns:\\n    - Axes: A matplotlib axes object representing the pie chart.\\n\\n    Requirements:\\n    - pandas\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> df = pd.DataFrame({'fruit': ['apple', 'banana', 'orange', 'apple', 'banana', 'banana']})\\n    >>> ax = task_func(df, 'fruit', title='Fruit Distribution')\\n    >>> print(ax.get_title())\\n    Fruit Distribution\\n    >>> plt.close()\\n\\n    Raises:\\n    - The input df must be DataFrame, not be empty, and must contain the specified column, if it is not, the function will raise ValueError.\\n\\n    Note:\\n    - Each unique value in the column is represented by a slice in the pie chart with a unique color from a predefined set. \\n    - The pie chart can have a title if specified.\\n\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Draw a pie chart of the number of unique values in a given DataFrame column with an optional title.\\nNote that: Each unique value in the column is represented by a slice in the pie chart with a unique color from a predefined set. The pie chart can have a title if specified.\\nThe function should raise the exception for: The input df must be DataFrame, not be empty, and must contain the specified column, if it is not, the function will raise ValueError.\\nThe function should output with:\\n    Axes: A matplotlib axes object representing the pie chart.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport matplotlib.pyplot as plt\\n# Constants for pie chart colors\\nCOLORS = ['r', 'g', 'b', 'y', 'm']\\ndef task_func(df, col, title=None):\\n```\",\"libs\":\"['pandas', 'matplotlib']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}