{"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":"518a7168-b5b8-509a-97a8-0f7cbcaf15c8","task_key":"default--v0~2e1~2e0~5fhf--518a7168-b5b8-509a-97a8-0f7cbcaf15c8","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 518a7168-b5b8-509a-97a8-0f7cbcaf15c8","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import seaborn as sns\\nfrom scipy.stats import chi2_contingency\\ndef task_func(df1, df2, column1=\\\"feature1\\\", column2=\\\"feature2\\\"):\\n\",\"complete_prompt\":\"import seaborn as sns\\nfrom scipy.stats import chi2_contingency\\n\\n\\ndef task_func(df1, df2, column1=\\\"feature1\\\", column2=\\\"feature2\\\"):\\n    \\\"\\\"\\\"\\n    Merge two dataframes based on the 'id' column, perform a chi-square independence test on the merged dataframe,\\n    and draw a heatmap of the contingency table created from the features in column1, column2.\\n\\n    Parameters:\\n    - df1 (DataFrame): Left dataframe to merge. Must contain columns 'id' and one matching column1.\\n    - df2 (DataFrame): Right dataframe to merge from. Must contain columns 'id' and one matching column2.\\n    - column1   (str): Name of column containing features in df1. Defaults to 'feature1'.\\n    - column2   (str): Name of column containing features in df2. Defaults to 'feature2'.\\n\\n    Returns:\\n    tuple: A tuple containing:\\n        - p (float): The p-value of the Chi-Squared test.\\n        - heatmap (matplotlib.pyplot.Axes): Seaborn heatmap of the contingency table.\\n\\n    Requirements:\\n    - seaborn\\n    - scipy.stats.chi2_contingency\\n\\n    Example:\\n    >>> import pandas as pd\\n    >>> df1 = pd.DataFrame({'id': [1, 2, 3], 'feature1': ['A', 'B', 'A']})\\n    >>> df2 = pd.DataFrame({'id': [1, 2, 3], 'feature2': ['X', 'Y', 'X']})\\n    >>> p_value, heatmap = task_func(df1, df2)\\n    >>> p_value\\n    0.6650055421020291\\n    >>> heatmap\\n    <Axes: xlabel='feature2', ylabel='feature1'>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Merge two dataframes based on the 'id' column, perform a chi-square independence test on the merged dataframe, and draw a heatmap of the contingency table created from the features in column1, column2.\\nThe function should output with:\\n    tuple: A tuple containing:\\n    p (float): The p-value of the Chi-Squared test.\\n    heatmap (matplotlib.pyplot.Axes): Seaborn heatmap of the contingency table.\\nYou should write self-contained code starting with:\\n```\\nimport seaborn as sns\\nfrom scipy.stats import chi2_contingency\\ndef task_func(df1, df2, column1=\\\"feature1\\\", column2=\\\"feature2\\\"):\\n```\",\"libs\":\"['scipy', 'seaborn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}