{"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":"c3d6f133-900b-509a-992a-73606f3a4460","task_key":"default--v0~2e1~2e0~5fhf--c3d6f133-900b-509a-992a-73606f3a4460","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf c3d6f133-900b-509a-992a-73606f3a4460","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport numpy as np\\nimport itertools\\nfrom datetime import datetime, timedelta\\nimport seaborn as sns\\ndef task_func(df, fruits=None, days=None, seed=None, sales_lower_bound=1, sales_upper_bound=50):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport numpy as np\\nimport itertools\\nfrom datetime import datetime, timedelta\\nimport seaborn as sns\\n\\ndef task_func(df, fruits=None, days=None, seed=None, sales_lower_bound=1, sales_upper_bound=50):\\n    \\\"\\\"\\\"\\n    Appends randomly generated sales data for specified fruits over a given range of days to a DataFrame, \\n    and returns a seaborn boxplot of the sales.\\n\\n    Parameters:\\n    - df (pd.DataFrame): Initial Empty DataFrame to append sales data to. Must be empty. \\n    - fruits (List[str], optional): List of fruits for sales data. Defaults to ['Apple', 'Banana', 'Cherry', 'Date', 'Elderberry'].\\n    - days (List[datetime], optional): List of days for sales data. Defaults to the range from January 1, 2024, to January 7, 2024.\\n    - seed (int, optional): Seed for the random number generator. Defaults to None.\\n    - sales_lower_bound (int, optional): Lower bound for random sales values. Defaults to 1.\\n    - sales_upper_bound (int, optional): Upper bound for random sales values. Defaults to 50.\\n\\n    Returns:\\n    Tuple[pd.DataFrame, sns.axisgrid.FacetGrid]: Updated DataFrame with sales data and a seaborn boxplot of the sales.\\n\\n    Raises:\\n    TypeError: If 'df' is not a pandas DataFrame.\\n    ValueError: If 'df' is not empty or  If 'sales_lower_bound' is not less than 'sales_upper_bound'.\\n\\n    Requirements:\\n    - pandas \\n    - numpy\\n    - itertools\\n    - datetime\\n    - seaborn\\n\\n    Example:\\n    >>> initial_df = pd.DataFrame()\\n    >>> report_df, plot = task_func(initial_df, seed=42)\\n    >>> print(report_df.head())\\n       Fruit        Day  Sales\\n    0  Apple 2024-01-01     39\\n    1  Apple 2024-01-02     29\\n    2  Apple 2024-01-03     15\\n    3  Apple 2024-01-04     43\\n    4  Apple 2024-01-05      8\\n    >>> plot.figure.show()\\n\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Appends randomly generated sales data for specified fruits over a given range of days to a DataFrame, and returns a seaborn boxplot of the sales.\\nThe function should raise the exception for: TypeError: If 'df' is not a pandas DataFrame. ValueError: If 'df' is not empty or  If 'sales_lower_bound' is not less than 'sales_upper_bound'.\\nThe function should output with:\\n    Tuple[pd.DataFrame, sns.axisgrid.FacetGrid]: Updated DataFrame with sales data and a seaborn boxplot of the sales.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport numpy as np\\nimport itertools\\nfrom datetime import datetime, timedelta\\nimport seaborn as sns\\ndef task_func(df, fruits=None, days=None, seed=None, sales_lower_bound=1, sales_upper_bound=50):\\n```\",\"libs\":\"['pandas', 'itertools', 'numpy', 'seaborn', 'datetime']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}