{"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":"28b80076-9ea5-53cd-bb2e-581da124d0ae","task_key":"default--v0~2e1~2e0~5fhf--28b80076-9ea5-53cd-bb2e-581da124d0ae","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 28b80076-9ea5-53cd-bb2e-581da124d0ae","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport statsmodels.api as sm\\ndef task_func(df: pd.DataFrame, height: int, weight: int, columns: list) -> sm.regression.linear_model.RegressionResultsWrapper:\\n\",\"complete_prompt\":\"import pandas as pd\\nimport statsmodels.api as sm\\n\\n\\ndef task_func(df: pd.DataFrame, height: int, weight: int, columns: list) -> sm.regression.linear_model.RegressionResultsWrapper:\\n    \\\"\\\"\\\"\\n    Performs an OLS linear regression on a subset of the provided DataFrame. The subset is created by filtering rows \\n    where the value in the second column of 'columns' is greater than 'height' and the value in the third column is \\n    less than 'weight'. The first column in 'columns' is used as the dependent variable / target (y), and the rest as independent \\n    variables (X) in the regression.\\n\\n    If df is empty, or if no rows match the conditions None is returned.\\n\\n\\n    Parameters:\\n    - df (pd.DataFrame): The DataFrame to analyze.\\n    - height (int): The threshold to filter rows based on the second column in 'columns'.\\n    - weight (int): The threshold to filter rows based on the third column in 'columns'.\\n    - columns (list of str): A list of column names to use, where the first is the dependent variable.\\n\\n    Returns:\\n    - sm.regression.linear_model.RegressionResultsWrapper: The result of the OLS regression, or None if no rows meet the criteria or DataFrame is empty.\\n\\n    Requirements:\\n    - pandas\\n    - statsmodels\\n\\n    Example:\\n    >>> df = pd.DataFrame({'Age': [30, 40], 'Height': [60, 70], 'Weight': [100, 150]})\\n    >>> model = task_func(df, 50, 120, ['Age', 'Height', 'Weight'])\\n\\n    >>> df = pd.DataFrame(np.random.randint(10,98,size=(100, 3)), columns=['Age', 'Height', 'Weight'])\\n    >>> model = task_func(df, 45, 72, columns=['Age', 'Height', 'Weight'])\\n\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Performs an OLS linear regression on a subset of the provided DataFrame. The subset is created by filtering rows where the value in the second column of 'columns' is greater than 'height' and the value in the third column is less than 'weight'. The first column in 'columns' is used as the dependent variable / target (y), and the rest as independent variables (X) in the regression. If df is empty, or if no rows match the conditions None is returned. >>> df = pd.DataFrame(np.random.randint(10,98,size=(100, 3)), columns=['Age', 'Height', 'Weight']) >>> model = task_func(df, 45, 72, columns=['Age', 'Height', 'Weight'])\\nThe function should output with:\\n    sm.regression.linear_model.RegressionResultsWrapper: The result of the OLS regression, or None if no rows meet the criteria or DataFrame is empty.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport statsmodels.api as sm\\ndef task_func(df: pd.DataFrame, height: int, weight: int, columns: list) -> sm.regression.linear_model.RegressionResultsWrapper:\\n```\",\"libs\":\"['pandas', 'statsmodels']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}