{"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":"ba804448-3170-594c-b02e-2629610c42dc","task_key":"default--v0~2e1~2e0~5fhf--ba804448-3170-594c-b02e-2629610c42dc","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf ba804448-3170-594c-b02e-2629610c42dc","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport os\\nimport numpy as np\\nimport ast\\ndef task_func(directory):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport os\\nimport numpy as np\\nimport ast\\n\\ndef task_func(directory):\\n    \\\"\\\"\\\"\\n    Traverse a directory for CSV files a get the file with the longest filename. From that CSV file, load e-mail data, convert it into a Pandas DataFrame, calculate the sum, mean and median of the list associated with each e-mail, and then draw a histogram of the median.\\n    - The column names of each CSV files are 'email' and 'list'.\\n    - The column 'list' contains a string representation of a list. It should be converted before usage.\\n    - If there is not csv file in the directory, return an empty dataframe with the columns expected.\\n    - If there is not csv file in the directory, return None instead of an empty plot.\\n\\n    Parameters:\\n    - directory (str): The path to the directory.\\n\\n    Returns:\\n    - pandas.DataFrame : DataFrame containing the data from the CSV file with the longest filename augmented with the columns 'sum', 'mean' and 'median'.\\n    - matplotlib.axes._axes.Axes : Histogram of the median. None if there is no data to plot.\\n\\n    Requirements:\\n    - pandas\\n    - os\\n    - numpy\\n    - ast\\n\\n    Example:\\n    >>> task_func('data_directory')\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Traverse a directory for CSV files a get the file with the longest filename. From that CSV file, load e-mail data, convert it into a Pandas DataFrame, calculate the sum, mean and median of the list associated with each e-mail, and then draw a histogram of the median. - The column names of each CSV files are 'email' and 'list'. - The column 'list' contains a string representation of a list. It should be converted before usage. - If there is not csv file in the directory, return an empty dataframe with the columns expected. - If there is not csv file in the directory, return None instead of an empty plot.\\nThe function should output with:\\n    pandas.DataFrame : DataFrame containing the data from the CSV file with the longest filename augmented with the columns 'sum', 'mean' and 'median'.\\n    matplotlib.axes._axes.Axes : Histogram of the median. None if there is no data to plot.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport os\\nimport numpy as np\\nimport ast\\ndef task_func(directory):\\n```\",\"libs\":\"['pandas', 'numpy', 'ast', 'os']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}