# BigCodeBench / 

task_id: a2baeee3-1719-5a2a-97ec-f1fc836776f1
task_key: default--v0~2e1~2e0~5fhf--a2baeee3-1719-5a2a-97ec-f1fc836776f1
task_revision_id: 1

{"code_prompt":"import pandas as pd\nimport random\nimport re\ndef task_func(person_names, email_domains, num_records=5):\n","complete_prompt":"import pandas as pd\nimport random\nimport re\n\ndef task_func(person_names, email_domains, num_records=5):\n    \"\"\"\n    Generate a DataFrame with a specified number of records containing personal names and emails. \n    The emails are cleaned by replacing all occurrences of \"@\" with \"[at]\".\n    \n    Parameters:\n    - person_names (list of str): A list of person names to use in the records.\n    - email_domains (list of str): A list of email domains to use in the records.\n    - num_records (int, optional): The number of records to generate. Default is 5.\n    \n    Returns:\n    - DataFrame: A pandas DataFrame with columns 'Name' and 'Email' containing the person names and cleaned emails.\n    \n    Requirements:\n    - pandas for DataFrame manipulation\n    - random for random selection\n    - re for regular expression operations\n    \n    Raises:\n    - ValueError: If the number of names provided is less than the number of records requested or if no email domains are provided.\n    \n    Example:\n    >>> random.seed(0)  # Initialize random seed\n    >>> task_func(['John Doe', 'Jane Smith'], ['gmail.com', 'yahoo.com'], 2)\n             Name              Email\n    0  Jane Smith  jane[at]gmail.com\n    1    John Doe  john[at]yahoo.com\n    >>> task_func(['Alice'], ['outlook.com'], 1)\n        Name                 Email\n    0  Alice  alice[at]outlook.com\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Generate a DataFrame with a specified number of records containing personal names and emails. The emails are cleaned by replacing all occurrences of \"@\" with \"[at]\".\nThe function should raise the exception for: ValueError: If the number of names provided is less than the number of records requested or if no email domains are provided.\nThe function should output with:\n    DataFrame: A pandas DataFrame with columns 'Name' and 'Email' containing the person names and cleaned emails.\nYou should write self-contained code starting with:\n```\nimport pandas as pd\nimport random\nimport re\ndef task_func(person_names, email_domains, num_records=5):\n```","libs":"['pandas', 'random', 're']"}

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

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=a2baeee3-1719-5a2a-97ec-f1fc836776f1&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
