{"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":"36a4e871-195d-58f4-bf55-310fee4c5857","task_key":"default--v0~2e1~2e0~5fhf--36a4e871-195d-58f4-bf55-310fee4c5857","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 36a4e871-195d-58f4-bf55-310fee4c5857","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import sqlite3\\nimport pandas as pd\\nimport csv\\nfrom io import StringIO\\n# Constants\\nDATABASE_NAME = 'test.db'\\nTABLE_NAME = 'test_table'\\ndef task_func(csv_input):\\n\",\"complete_prompt\":\"import sqlite3\\nimport pandas as pd\\nimport csv\\nfrom io import StringIO\\n\\n# Constants\\nDATABASE_NAME = 'test.db'\\nTABLE_NAME = 'test_table'\\n\\n\\ndef task_func(csv_input):\\n    \\\"\\\"\\\"\\n    Imports data from a specified CSV input into an SQLite database and retrieves it as a pandas DataFrame. The function\\n    reads the CSV input (file path or `StringIO`), creates a new database table or replaces an existing one, inserts\\n    data into the table, and finally queries the table to return the data as a DataFrame.\\n\\n    Parameters:\\n    csv_input (str or StringIO): The path to the CSV file or a `StringIO` object containing CSV data.\\n\\n    Returns:\\n    DataFrame: A pandas DataFrame containing the data from the newly populated SQLite database table. The DataFrame\\n    provides a convenient and familiar data structure for further data manipulation and analysis in Python.\\n\\n    Requirements:\\n    - sqlite3\\n    - pandas\\n    - csv\\n    - io\\n\\n    Example:\\n    >>> from io import StringIO\\n    >>> test_csv_data = \\\"id,name\\\\\\\\n1,Alice\\\\\\\\n2,Bob\\\"\\n    >>> test_csv_file = StringIO(test_csv_data)  # This is the in-memory CSV data\\n    >>> # Testing the function with the in-memory CSV data\\n    >>> df = task_func(test_csv_file)\\n    >>> print(df)\\n      id   name\\n    0  1  Alice\\n    1  2    Bob\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Imports data from a specified CSV input into an SQLite database and retrieves it as a pandas DataFrame. The function reads the CSV input (file path or `StringIO`), creates a new database table or replaces an existing one, inserts data into the table, and finally queries the table to return the data as a DataFrame.\\nThe function should output with:\\n    DataFrame: A pandas DataFrame containing the data from the newly populated SQLite database table. The DataFrame\\n    provides a convenient and familiar data structure for further data manipulation and analysis in Python.\\nYou should write self-contained code starting with:\\n```\\nimport sqlite3\\nimport pandas as pd\\nimport csv\\nfrom io import StringIO\\n# Constants\\nDATABASE_NAME = 'test.db'\\nTABLE_NAME = 'test_table'\\ndef task_func(csv_input):\\n```\",\"libs\":\"['sqlite3', 'pandas', 'io', 'csv']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}