{"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":"ff9df5d3-1e8c-5d8c-8ce5-895aabf55a1b","task_key":"default--v0~2e1~2e0~5fhf--ff9df5d3-1e8c-5d8c-8ce5-895aabf55a1b","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf ff9df5d3-1e8c-5d8c-8ce5-895aabf55a1b","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom statistics import mean\\ndef task_func(df: pd.DataFrame) -> dict:\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom statistics import mean\\n\\n\\ndef task_func(df: pd.DataFrame) -> dict:\\n    \\\"\\\"\\\"\\n    Convert a Pandas DataFrame into a dictionary of generator objects in which \\n    each generator generates a sequence of tuples that contain a unique name \\n    and the corresponding average score for that name.\\n\\n    Parameters:\\n    df (DataFrame): The DataFrame containing 'Name' (string) and 'Score' (number) columns to analyze.\\n\\n    Returns:\\n    dict: A dictionary of generator objects. Each generator generates a tuple \\n          containing a unique name and the corresponding average score for that name.\\n\\n    Raises:\\n    ValueError: If the DataFrame does not have the 'Name' and 'Score' columns.\\n\\n    Requirements:\\n    - pandas\\n    - statistics\\n\\n    Example:\\n    >>> df_sample = pd.DataFrame({\\n    ...     'Name': ['Tom', 'Nick', 'John', 'Tom', 'John'],\\n    ...     'Score': [85, 79, 90, 88, 82]\\n    ... })\\n    >>> gen_dict = task_func(df_sample)\\n    >>> {key: next(value) for key, value in gen_dict.items()}\\n    {'John': ('John', 86), 'Nick': ('Nick', 79), 'Tom': ('Tom', 86.5)}\\n\\n    >>> df_sample = pd.DataFrame({\\n    ...     'Name': ['Micky', 'Donald', 'Girl'],\\n    ...     'Score': [25.2, 9, -1]\\n    ... })\\n    >>> gen_dict = task_func(df_sample)\\n    >>> {key: next(value) for key, value in gen_dict.items()}\\n    {'Donald': ('Donald', 9.0), 'Girl': ('Girl', -1.0), 'Micky': ('Micky', 25.2)}\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Convert a Pandas DataFrame into a dictionary of generator objects in which each generator generates a sequence of tuples that contain a unique name and the corresponding average score for that name. >>> df_sample = pd.DataFrame({ ...     'Name': ['Micky', 'Donald', 'Girl'], ...     'Score': [25.2, 9, -1] ... }) >>> gen_dict = task_func(df_sample) >>> {key: next(value) for key, value in gen_dict.items()} {'Donald': ('Donald', 9.0), 'Girl': ('Girl', -1.0), 'Micky': ('Micky', 25.2)}\\nThe function should raise the exception for: ValueError: If the DataFrame does not have the 'Name' and 'Score' columns.\\nThe function should output with:\\n    dict: A dictionary of generator objects. Each generator generates a tuple\\n    containing a unique name and the corresponding average score for that name.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom statistics import mean\\ndef task_func(df: pd.DataFrame) -> dict:\\n```\",\"libs\":\"['statistics', 'pandas']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}