{"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":"e5f0924a-f3c0-50f5-b525-102c3e191990","task_key":"default--v0~2e1~2e0~5fhf--e5f0924a-f3c0-50f5-b525-102c3e191990","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf e5f0924a-f3c0-50f5-b525-102c3e191990","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport numpy as np\\ndef task_func(fruit_data):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport numpy as np\\n\\ndef task_func(fruit_data):\\n    \\\"\\\"\\\"\\n    Calculate and return the total and average counts for each type of fruit.\\n\\n    This function takes a list of tuples, each containing a fruit name and its count, \\n    then calculates the total count and the average count for each type of fruit. \\n    The results are returned as a pandas DataFrame with each row representing a different fruit.\\n\\n    If fruit_data is an empty list, an empty dataFrame is returned.\\n\\n    Parameters:\\n    fruit_data (list of tuples): Each tuple contains a string representing the fruit name and an integer for the count.\\n\\n    Returns:\\n    DataFrame: A pandas DataFrame with two columns: 'Total Count' and 'Average Count'. \\n               Each row's index is the fruit name.\\n\\n    Requirements:\\n    - pandas\\n    - numpy\\n\\n    Example:\\n    >>> fruit_list = [('apple', 5), ('banana', 3), ('apple', 6), ('banana', 4), ('cherry', 5), ('banana', 2), ('apple', 4), ('cherry', 5)]\\n    >>> report = task_func(fruit_list)\\n    >>> report.sort_index(inplace=True)\\n    >>> print(report)\\n            Total Count  Average Count\\n    apple            15            5.0\\n    banana            9            3.0\\n    cherry           10            5.0\\n\\n    >>> fruit = [('apple', 1), ('orange', 25), ('apple', 111)]\\n    >>> df = task_func(fruit)\\n    >>> df.sort_index(inplace=True)\\n    >>> print(df)\\n            Total Count  Average Count\\n    apple           112           56.0\\n    orange           25           25.0\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Calculate and return the total and average counts for each type of fruit. This function takes a list of tuples, each containing a fruit name and its count, then calculates the total count and the average count for each type of fruit. The results are returned as a pandas DataFrame with each row representing a different fruit. If fruit_data is an empty list, an empty dataFrame is returned. >>> fruit = [('apple', 1), ('orange', 25), ('apple', 111)] >>> df = task_func(fruit) >>> df.sort_index(inplace=True) >>> print(df) Total Count  Average Count apple           112           56.0 orange           25           25.0\\nThe function should output with:\\n    DataFrame: A pandas DataFrame with two columns: 'Total Count' and 'Average Count'.\\n    Each row's index is the fruit name.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport numpy as np\\ndef task_func(fruit_data):\\n```\",\"libs\":\"['pandas', 'numpy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}