{"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":"8aef31a2-63a9-5703-a540-f8c4a06d1593","task_key":"default--v0~2e1~2e0~5fhf--8aef31a2-63a9-5703-a540-f8c4a06d1593","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 8aef31a2-63a9-5703-a540-f8c4a06d1593","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport matplotlib.pyplot as plt\\ndef task_func(df, dct, columns=None, plot_histograms=False):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport matplotlib.pyplot as plt\\n\\ndef task_func(df, dct, columns=None, plot_histograms=False):\\n    '''\\n    Replace values in a DataFrame with a dictionary mapping and optionally record histograms for specified columns.\\n    \\n    Parameters:\\n    df (DataFrame): The input DataFrame.\\n    dct (dict): A dictionary for replacing values in df.\\n    columns (list of str, optional): List of column names to plot histograms. If None, no histograms are plotted.\\n    plot_histograms (bool): If True, plots histograms for specified columns.\\n\\n    Returns:\\n    DataFrame: The DataFrame with replaced values. The columns are in the format of 'col1', 'col2', etc.\\n\\n    Requirements:\\n    - pandas\\n    - matplotlib.pyplot\\n    \\n    Raises:\\n    - The function will raise a ValueError is input df is not a DataFrame.\\n    \\n    Example:\\n    >>> df = pd.DataFrame({'col1': [1, 2, 3, 4], 'col2': [5, 6, 7, 8], 'col3': [9, 10, 11, 12]})\\n    >>> dct = {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e', 6: 'f', 7: 'g', 8: 'h', 9: 'i', 10: 'j', 11: 'k', 12: 'l'}\\n    >>> modified_df = task_func(df, dct)\\n    >>> modified_df\\n      col1 col2 col3\\n    0    a    e    i\\n    1    b    f    j\\n    2    c    g    k\\n    3    d    h    l\\n    '''\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Replace values in a DataFrame with a dictionary mapping and optionally record histograms for specified columns.\\nThe function should raise the exception for: The function will raise a ValueError is input df is not a DataFrame.\\nThe function should output with:\\n    DataFrame: The DataFrame with replaced values. The columns are in the format of 'col1', 'col2', etc.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport matplotlib.pyplot as plt\\ndef task_func(df, dct, columns=None, plot_histograms=False):\\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":[]}