{"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":"a645cbba-f7bf-59c1-912c-b9ed5e229e7a","task_key":"default--v0~2e1~2e0~5fhf--a645cbba-f7bf-59c1-912c-b9ed5e229e7a","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a645cbba-f7bf-59c1-912c-b9ed5e229e7a","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom sklearn.preprocessing import MinMaxScaler\\ndef task_func(list_of_pairs):\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom sklearn.preprocessing import MinMaxScaler\\n\\n\\ndef task_func(list_of_pairs):\\n    \\\"\\\"\\\"\\n    Create a Pandas DataFrame from a list of pairs and normalize the data using MinMaxScaler.\\n    \\n    Parameters:\\n    list_of_pairs (list): A list of tuples, where the first element is the category and \\n                          the second element is the value.\\n    \\n    Returns:\\n    DataFrame:  A pandas DataFrame containing the columns 'Category' and 'Value'.\\n                Category contains the the first elements of each tuple.\\n                Value contains the normalized values of each tuple.\\n\\n    Raises:\\n        Exception: If the input array is empty.\\n        ValueError: If Values are not numeric.\\n    \\n    Requirements:\\n    - pandas\\n    - sklearn.preprocessing.MinMaxScaler\\n    \\n    Example:\\n    >>> list_of_pairs = [('Fruits', 5), ('Vegetables', 9), ('Dairy', -1), ('Bakery', -2), ('Meat', 4)]\\n    >>> df = task_func(list_of_pairs)\\n    >>> print(df)\\n         Category     Value\\n    0      Fruits  0.636364\\n    1  Vegetables  1.000000\\n    2       Dairy  0.090909\\n    3      Bakery  0.000000\\n    4        Meat  0.545455\\n    >>> list_of_pairs = [('car', 3.2), ('bike', 0), ('train', -1), ('plane', -6.2), ('ship', 1234)]\\n    >>> df = task_func(list_of_pairs)\\n    >>> print(df)\\n      Category     Value\\n    0      car  0.007579\\n    1     bike  0.004999\\n    2    train  0.004193\\n    3    plane  0.000000\\n    4     ship  1.000000\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Create a Pandas DataFrame from a list of pairs and normalize the data using MinMaxScaler.\\nThe function should raise the exception for: Exception: If the input array is empty. ValueError: If Values are not numeric.\\nThe function should output with:\\n    DataFrame:  A pandas DataFrame containing the columns 'Category' and 'Value'.\\n    Category contains the the first elements of each tuple.\\n    Value contains the normalized values of each tuple.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom sklearn.preprocessing import MinMaxScaler\\ndef task_func(list_of_pairs):\\n```\",\"libs\":\"['pandas', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}