# BigCodeBench / 

task_id: fce6a0b8-14d2-51e1-ae8f-6b5a682c12b8
task_key: default--v0~2e1~2e0~5fhf--fce6a0b8-14d2-51e1-ae8f-6b5a682c12b8
task_revision_id: 1

{"code_prompt":"import pandas as pd\nimport re\nfrom scipy import stats\ndef task_func(text):\n","complete_prompt":"import pandas as pd\nimport re\nfrom scipy import stats\n\n\ndef task_func(text):\n    \"\"\"\n    Extracts all names from a given text string that are not surrounded by square brackets \n    and counts the frequency of each extracted name. It then creates a bar chart of the name frequencies and\n    returns the name frequencies as a pandas Series and the bar chart plot's axes object along with the skewness \n    and kurtosis of the name frequencies. If the skewness and kurtosis are nan, they are returned as None.\n    \n    Parameters:\n    text (str): The text from which to extract names. Each name should be separated by square brackets containing addresses.\n    \n    Returns:\n    tuple: A tuple containing:\n        - pd.Series: A pandas Series with the frequency of each name.\n        - Axes: A bar chart plot showing the name frequencies. If no names are found, this will be None.\n        - float: The skewness of the name frequencies.\n        - float: The kurtosis of the name frequencies.\n    \n    Requirements:\n    - re\n    - pandas\n    - matplotlib.pyplot\n    - scipy.stats\n    \n    Example:\n    >>> text_input = \"Josie Smith [3996 COLLEGE AVENUE, SOMETOWN, MD 21003]Mugsy Dog Smith [2560 OAK ST, GLENMEADE, WI 14098]\"\n    >>> name_freqs, plot, skew, kurtosis = task_func(text_input)\n    >>> print(list(name_freqs.items())[0])\n    ('Josie Smith', 1)\n    >>> type(plot)\n    <class 'matplotlib.axes._axes.Axes'>\n    >>> round(kurtosis, 2) is not None\n    True\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Extracts all names from a given text string that are not surrounded by square brackets and counts the frequency of each extracted name. It then creates a bar chart of the name frequencies and returns the name frequencies as a pandas Series and the bar chart plot's axes object along with the skewness and kurtosis of the name frequencies. If the skewness and kurtosis are nan, they are returned as None.\nThe function should output with:\n    tuple: A tuple containing:\n    pd.Series: A pandas Series with the frequency of each name.\n    Axes: A bar chart plot showing the name frequencies. If no names are found, this will be None.\n    float: The skewness of the name frequencies.\n    float: The kurtosis of the name frequencies.\nYou should write self-contained code starting with:\n```\nimport pandas as pd\nimport re\nfrom scipy import stats\ndef task_func(text):\n```","libs":"['pandas', 're', 'scipy']"}

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

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=fce6a0b8-14d2-51e1-ae8f-6b5a682c12b8&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
