{"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":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"98d53918-ee4c-5da3-914e-7f0faa69d224","task_key":"default--v0~2e1~2e0~5fhf--98d53918-ee4c-5da3-914e-7f0faa69d224","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 98d53918-ee4c-5da3-914e-7f0faa69d224","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport numpy as np\\nfrom sklearn.decomposition import PCA\\nimport seaborn as sns\\nimport matplotlib.pyplot as plt\\ndef task_func(df: pd.DataFrame):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport numpy as np\\nfrom sklearn.decomposition import PCA\\nimport seaborn as sns\\nimport matplotlib.pyplot as plt\\n\\ndef task_func(df: pd.DataFrame):\\n    \\\"\\\"\\\"\\n    Perform PCA on a DataFrame (excluding non-numeric columns) and draw a scatter plot of the first two main components. The principal columns should be name 'Component 1' and 'Component 2'.\\n    Missing values are replaced by column's average.\\n\\n    Parameters:\\n    df (DataFrame): The pandas DataFrame.\\n\\n    Returns:\\n    DataFrame: A pandas DataFrame with the first two principal components. The columns should be 'principal component 1' and 'principal component 2'.\\n    Axes: A matplotlib Axes object representing the scatter plot. The xlabel should be 'principal component' and the ylabel 'principal component 2'.\\n\\n    Requirements:\\n    - pandas\\n    - numpy\\n    - sklearn.decomposition.PCA\\n    - seaborn\\n    - matplotlib\\n\\n    Example:\\n    >>> df = pd.DataFrame([[1,2,3],[4,5,6],[7.0,np.nan,9.0]], columns=[\\\"c1\\\",\\\"c2\\\",\\\"c3\\\"])\\n    >>> principalDf, ax = task_func(df)\\n    >>> print(principalDf)\\n       Component 1  Component 2\\n    0     4.450915    -0.662840\\n    1    -0.286236     1.472436\\n    2    -4.164679    -0.809596\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Perform PCA on a DataFrame (excluding non-numeric columns) and draw a scatter plot of the first two main components. The principal columns should be name 'Component 1' and 'Component 2'. Missing values are replaced by column's average.\\nThe function should output with:\\n    DataFrame: A pandas DataFrame with the first two principal components. The columns should be 'principal component 1' and 'principal component 2'.\\n    Axes: A matplotlib Axes object representing the scatter plot. The xlabel should be 'principal component' and the ylabel 'principal component 2'.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport numpy as np\\nfrom sklearn.decomposition import PCA\\nimport seaborn as sns\\nimport matplotlib.pyplot as plt\\ndef task_func(df: pd.DataFrame):\\n```\",\"libs\":\"['pandas', 'matplotlib', 'numpy', 'sklearn', 'seaborn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}