{"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":"a1a1c822-df52-5584-9e5f-c9f7ab5cc1dd","task_key":"default--v0~2e1~2e0~5fhf--a1a1c822-df52-5584-9e5f-c9f7ab5cc1dd","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a1a1c822-df52-5584-9e5f-c9f7ab5cc1dd","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import re\\nimport matplotlib.pyplot as plt\\nfrom sklearn.feature_extraction.text import TfidfVectorizer\\nimport numpy as np\\ndef task_func(df):\\n\",\"complete_prompt\":\"import re\\nimport matplotlib.pyplot as plt\\nfrom sklearn.feature_extraction.text import TfidfVectorizer\\nimport numpy as np\\n\\n\\ndef task_func(df):\\n    \\\"\\\"\\\"\\n    Analyzes a given DataFrame containing article titles and content to identify articles with titles that include\\n    the words \\\"how\\\" or \\\"what\\\". It calculates the TF-IDF scores for the words in the content of these articles and\\n    visualizes these scores in a bar plot.\\n\\n    Parameters:\\n    df (DataFrame): A DataFrame containing at least two columns: 'Title' and 'Content'.\\n\\n    Returns:\\n    Axes: A matplotlib Axes object displaying a bar plot of the TF-IDF scores.\\n\\n    Note:\\n    - If the DataFrame does not contain 'Title' and 'Content' columns, the function returns an empty plot.\\n    - If no articles have titles containing \\\"how\\\" or \\\"what,\\\" the function also returns an empty plot.\\n    - Set the name of the y-axis to 'TF-IDF Score'.\\n    - Set xticks to display the feature names vertically.\\n\\n    Requirements:\\n    - re\\n    - matplotlib\\n    - sklearn\\n    - numpy\\n\\n    Example:\\n    >>> import pandas as pd\\n    >>> data = {'Title': ['How to make pancakes', 'News update'], 'Content': ['Pancakes are easy to make.', 'Today’s news is about politics.']}\\n    >>> df = pd.DataFrame(data)\\n    >>> ax = task_func(df)\\n    >>> type(ax)\\n    <class 'matplotlib.axes._axes.Axes'>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Analyzes a given DataFrame containing article titles and content to identify articles with titles that include the words \\\"how\\\" or \\\"what\\\". It calculates the TF-IDF scores for the words in the content of these articles and visualizes these scores in a bar plot.\\nNote that: If the DataFrame does not contain 'Title' and 'Content' columns, the function returns an empty plot. If no articles have titles containing \\\"how\\\" or \\\"what,\\\" the function also returns an empty plot. Set the name of the y-axis to 'TF-IDF Score'. Set xticks to display the feature names vertically.\\nThe function should output with:\\n    Axes: A matplotlib Axes object displaying a bar plot of the TF-IDF scores.\\nYou should write self-contained code starting with:\\n```\\nimport re\\nimport matplotlib.pyplot as plt\\nfrom sklearn.feature_extraction.text import TfidfVectorizer\\nimport numpy as np\\ndef task_func(df):\\n```\",\"libs\":\"['numpy', 'matplotlib', 're', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}