{"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":"ee5a7f1c-ac27-59c9-8b79-6f23f2912340","task_key":"default--v0~2e1~2e0~5fhf--ee5a7f1c-ac27-59c9-8b79-6f23f2912340","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf ee5a7f1c-ac27-59c9-8b79-6f23f2912340","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport matplotlib.pyplot as plt\\ndef task_func(df: pd.DataFrame) -> pd.DataFrame:\\n\",\"complete_prompt\":\"import pandas as pd\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(df: pd.DataFrame) -> pd.DataFrame:\\n    \\\"\\\"\\\"\\n    Calculate the cumulative sum for each column in a given DataFrame and plot\\n    the results in a bar chart.\\n\\n    Parameters:\\n    df (pd.DataFrame): The input DataFrame with numerical values.\\n                       Must not be empty and must contain numeric data to plot.\\n    Returns:\\n    - tuple: A tuple containing:\\n             (1) A DataFrame with cumulative sums for each column.\\n             (2) A matplotlib bar chart Figure of these cumulative sums.\\n\\n    Raises:\\n    - ValueError: If the DataFrame is empty or contains non-numeric data.\\n\\n    Requirements:\\n    - pandas\\n    - matplotlib\\n\\n    Note:\\n    - NaN values are ignored in the cumulative sum calculation, i.e. treated as\\n      zero for the purpose of the sum without changing existing values to NaN.\\n    - The plot title is set to 'Cumulative Sum per Column'.\\n    - X-axis label is 'Index' and Y-axis label is 'Cumulative Sum'.\\n    - A legend is included in the plot.\\n\\n    Example:\\n    >>> input_df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})\\n    >>> output_df, fig = task_func(input_df)\\n    >>> output_df\\n       A   B\\n    0  1   4\\n    1  3   9\\n    2  6  15\\n    >>> fig\\n    <Figure size 640x480 with 1 Axes>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Calculate the cumulative sum for each column in a given DataFrame and plot the results in a bar chart.\\nNote that: NaN values are ignored in the cumulative sum calculation, i.e. treated as zero for the purpose of the sum without changing existing values to NaN. The plot title is set to 'Cumulative Sum per Column'. X-axis label is 'Index' and Y-axis label is 'Cumulative Sum'. A legend is included in the plot.\\nThe function should raise the exception for: ValueError: If the DataFrame is empty or contains non-numeric data.\\nThe function should output with:\\n    tuple: A tuple containing:\\n    (1) A DataFrame with cumulative sums for each column.\\n    (2) A matplotlib bar chart Figure of these cumulative sums.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport matplotlib.pyplot as plt\\ndef task_func(df: pd.DataFrame) -> pd.DataFrame:\\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":[]}