{"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":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"65705720-76a6-50a7-a5f3-ff641e6c0203","task_key":"default--v0~2e1~2e0~5fhf--65705720-76a6-50a7-a5f3-ff641e6c0203","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 65705720-76a6-50a7-a5f3-ff641e6c0203","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport re\\nimport random\\ndef task_func(s: str, seed: int = 0) -> pd.DataFrame:\\n\",\"complete_prompt\":\"import pandas as pd\\nimport re\\nimport random\\n\\n\\ndef task_func(s: str, seed: int = 0) -> pd.DataFrame:\\n    \\\"\\\"\\\"\\n    Generate a Pandas DataFrame of products with their ID, quantity, code, price, product, and description\\n    based on a specified string of product data.\\n\\n    The input string is expected to be divided into segments by newlines. Each segment is expected to\\n    be further split into parts by whitespace: ID, quantity, code, price, and a product description.\\n    The function will remove trailing whitespaces in each field and assign a product name per unique code.\\n    Product name is randomly sampled from: ['Apple', 'Banana', 'Orange', 'Pear', 'Grape'].\\n    The same product name will be assigned to each code for each input s, however different codes can be\\n    mapped to the same name.\\n\\n    Parameters:\\n    - s    (str): Product data string split by newline, then whitespace.\\n                  Expected format per segment: '<ID> <Quantity> <Code> <Price> <Description>'\\n                  If incomplete, this function raises ValueError.\\n    - seed (int): Random seed for reproducibility. Defaults to 0.\\n\\n    Returns:\\n    - data_df (pd.DataFrame): DataFrame with columns: ['ID', 'Quantity', 'Code', 'Price', 'Product', 'Description'].\\n                              Quantity and Price are expected to be integers.\\n\\n    Requirements:\\n    - pandas\\n    - re\\n    - random\\n\\n    Examples:\\n    >>> s = '1 10 A10B 100 This is a description with spaces'\\n    >>> df = task_func(s)\\n    >>> df\\n      ID  Quantity  Code  Price Product                        Description\\n    0  1        10  A10B    100    Pear  This is a description with spaces\\n\\n    >>> s = '1 10 A10B 100 This is a description with spaces\\\\\\\\n2 20 B20C 200 Another description example'\\n    >>> df = task_func(s)\\n    >>> df\\n      ID  Quantity  Code  Price Product                        Description\\n    0  1        10  A10B    100    Pear  This is a description with spaces\\n    1  2        20  B20C    200    Pear        Another description example\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a Pandas DataFrame of products with their ID, quantity, code, price, product, and description based on a specified string of product data. The input string is expected to be divided into segments by newlines. Each segment is expected to be further split into parts by whitespace: ID, quantity, code, price, and a product description. The function will remove trailing whitespaces in each field and assign a product name per unique code. Product name is randomly sampled from: ['Apple', 'Banana', 'Orange', 'Pear', 'Grape']. The same product name will be assigned to each code for each input s, however different codes can be mapped to the same name. >>> s = '1 10 A10B 100 This is a description with spaces\\\\\\\\n2 20 B20C 200 Another description example' >>> df = task_func(s) >>> df ID  Quantity  Code  Price Product                        Description 0  1        10  A10B    100    Pear  This is a description with spaces 1  2        20  B20C    200    Pear        Another description example\\nThe function should output with:\\n    data_df (pd.DataFrame): DataFrame with columns: ['ID', 'Quantity', 'Code', 'Price', 'Product', 'Description'].\\n    Quantity and Price are expected to be integers.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport re\\nimport random\\ndef task_func(s: str, seed: int = 0) -> pd.DataFrame:\\n```\",\"libs\":\"['pandas', 'random', 're']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}