# BigCodeBench / 

task_id: 60a08104-c68a-5ab6-b8ad-265e1772a589
task_key: default--v0~2e1~2e0~5fhf--60a08104-c68a-5ab6-b8ad-265e1772a589
task_revision_id: 1

{"code_prompt":"import pandas as pd\nimport numpy as np\nimport random\nfrom random import randint, seed\n# Constants\nCATEGORIES = ['Electronics', 'Clothing', 'Home & Kitchen', 'Books', 'Toys & Games']\ndef task_func(mystrings, n_products, seed=0):\n","complete_prompt":"import pandas as pd\nimport numpy as np\nimport random\nfrom random import randint, seed\n\n# Constants\nCATEGORIES = ['Electronics', 'Clothing', 'Home & Kitchen', 'Books', 'Toys & Games']\n\ndef task_func(mystrings, n_products, seed=0):\n    \"\"\"\n    Create a product catalog DataFrame where each row represents a product with the following columns:\n    - 'Product Name': The name of the product with spaces replaced by underscores.\n    - 'Category': The category to which the product belongs.\n    - 'Price': The price of the product, generated randomly based on a normal distribution with a mean of 50 and a standard deviation of 10.\n    \n    Parameters:\n    mystrings (list of str): List of product names.\n    n_products (int): Number of products to generate in the catalog.\n\n    Returns:\n    pd.DataFrame: A pandas DataFrame containing the product catalog information.\n\n    Requirements:\n    - pandas\n    - numpy\n    - random.randint\n    - random.seed\n\n    Constants:\n    - CATEGORIES: A list of categories used to randomly assign a category to each product.\n\n    Examples:\n    >>> task_func(['Mobile Phone', 'T Shirt', 'Coffee Maker', 'Python Book', 'Toy Car'], 2)\n       Product Name        Category  Price\n    0   Python_Book           Books  67.64\n    1  Mobile_Phone  Home & Kitchen  54.00\n    >>> task_func(['Laptop', 'Sweater'], 1)\n      Product Name Category  Price\n    0      Sweater    Books  67.64\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Create a product catalog DataFrame where each row represents a product with the following columns: - 'Product Name': The name of the product with spaces replaced by underscores. - 'Category': The category to which the product belongs. - 'Price': The price of the product, generated randomly based on a normal distribution with a mean of 50 and a standard deviation of 10. Constants: - CATEGORIES: A list of categories used to randomly assign a category to each product.\nThe function should output with:\n    pd.DataFrame: A pandas DataFrame containing the product catalog information.\nYou should write self-contained code starting with:\n```\nimport pandas as pd\nimport numpy as np\nimport random\nfrom random import randint, seed\n# Constants\nCATEGORIES = ['Electronics', 'Clothing', 'Home & Kitchen', 'Books', 'Toys & Games']\ndef task_func(mystrings, n_products, seed=0):\n```","libs":"['pandas', 'numpy', 'random']"}

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

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=60a08104-c68a-5ab6-b8ad-265e1772a589&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
