# BigCodeBench / 

task_id: e7500727-8a48-5a1e-a419-f19cd0790c1f
task_key: default--v0~2e1~2e0~5fhf--e7500727-8a48-5a1e-a419-f19cd0790c1f
task_revision_id: 1

{"code_prompt":"import pandas as pd\nfrom datetime import datetime\ndef task_func(data, date_format, country, country_codes=None):\n","complete_prompt":"import pandas as pd\nfrom datetime import datetime\n\ndef task_func(data, date_format, country, country_codes=None):\n    \"\"\" \n    Draw a histogram of the data from a DataFrame column of the pandas after converting the data into a specific format,\n    and return the matplotlib Axes object.\n\n    Parameters:\n    data (DataFrame): The pandas DataFrame containing date strings. The DataFrame has a column named 'dates' with the format '%d/%m/%Y'\n    date_format (str): The date format string.\n    country (str): The country name.\n    country_codes (dict, optional): A dictionary mapping country names. Defaults to a predefined dictionary, where default is:\n        default_country_codes = {\n            'Russia': 'ru_RU',\n            'Germany': 'de_DE',\n            'France': 'fr_FR',\n            'Spain': 'es_ES',\n            'Italy': 'it_IT'\n        }\n\n    Returns:\n    matplotlib.axes.Axes: The Axes object of the plotted histogram.\n\n    Raises:\n    ValueError: If 'data' is not a DataFrame, 'date_format' is not a string, 'country' is not in 'country_codes',\n                or 'country_codes' is not a dictionary.\n\n    Additional Notes:\n    The title of the plot should be 'Date Distribution'. The y label should be named with 'Frequency'.\n    \n    Requirements:\n    - pandas\n    - datetime\n\n    Example:\n    >>> data = pd.DataFrame({'dates': ['01/01/2000', '01/02/2000', '02/03/2000', '04/05/2000', '06/07/2000']})\n    >>> ax = task_func(data, '%d/%m/%Y', 'Russia')\n    >>> ax.get_title()\n    'Date Distribution'\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Draw a histogram of the data from a DataFrame column of the pandas after converting the data into a specific format, and return the matplotlib Axes object. Additional Notes: The title of the plot should be 'Date Distribution'. The y label should be named with 'Frequency'.\nThe function should raise the exception for: ValueError: If 'data' is not a DataFrame, 'date_format' is not a string, 'country' is not in 'country_codes', or 'country_codes' is not a dictionary.\nThe function should output with:\n    matplotlib.axes.Axes: The Axes object of the plotted histogram.\nYou should write self-contained code starting with:\n```\nimport pandas as pd\nfrom datetime import datetime\ndef task_func(data, date_format, country, country_codes=None):\n```","libs":"['pandas', 'datetime']"}

Source: https://bigcode-bench.github.io/

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=e7500727-8a48-5a1e-a419-f19cd0790c1f&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
