{"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":"02f8abc1-6c8f-574b-8f97-2daeb0a329e2","task_key":"default--v0~2e1~2e0~5fhf--02f8abc1-6c8f-574b-8f97-2daeb0a329e2","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 02f8abc1-6c8f-574b-8f97-2daeb0a329e2","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport pandas as pd\\nimport random\\ndef task_func(csv_file, column_name='data', pattern='\\\\d+[xX]', sample_size=None, seed=42):\\n\",\"complete_prompt\":\"import pandas as pd\\n\\nimport pandas as pd\\nimport random\\n\\n\\ndef task_func(csv_file, column_name='data', pattern='\\\\d+[xX]', sample_size=None, seed=42):\\n    \\\"\\\"\\\" \\n    Search for matches with a specified regex pattern in a given column of a CSV file and optionally return a random sample of these matches.\\n    \\n    The random sampling is implemented by generating a random list of integers which are used as indices.\\n    The number of generated indices is given by sample_size.\\n    \\n\\n    Parameters:\\n    csv_file (str): Path to the CSV file.\\n    column_name (str, optional): The name of the column to search. Defaults to 'data'.\\n    pattern (str, optional): The regex pattern to search for. Defaults to '\\\\d+[xX]'.\\n    sample_size (int, optional): Number of random samples to return from the matches. If None, all matches are returned. Defaults to None.\\n    seed (int, optional): Seed for the random number generator for reproducibility. Defaults to 42.\\n    \\n    Returns:\\n    DataFrame: A pandas DataFrame containing either all the rows with matches or a random sample of them.\\n    \\n    Requirements:\\n    - pandas\\n    - random: for generating the random list of indices\\n    \\n    Example:\\n    >>> result = task_func('sample.csv', column_name='data', pattern='\\\\d+[xX]', sample_size=10, seed=42)\\n    >>> print(result)\\n            index                                               data\\n    210    211  Fund several agency oil. Evening plant thank t...\\n    45      46  Language interest four take old. Education if ...\\n    525    526  Action million cultural stand. Heart explain a...\\n    465    466  Security face clearly every could. Image beaut...\\n    430    431  Popular produce floor part soldier human. Youn...\\n    260    261  Customer game focus respond that central. Nigh...\\n    195    196  The writer parent. Life social house west ten ...\\n    165    166  Main hotel production nothing.\\\\r\\\\nCoach voice ...\\n    810    811  Early right nature technology. Conference mind...\\n    60      61  Interest require gas wall. Different it see fi...\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Search for matches with a specified regex pattern in a given column of a CSV file and optionally return a random sample of these matches. The random sampling is implemented by generating a random list of integers which are used as indices. The number of generated indices is given by sample_size.\\nThe function should output with:\\n    DataFrame: A pandas DataFrame containing either all the rows with matches or a random sample of them.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport pandas as pd\\nimport random\\ndef task_func(csv_file, column_name='data', pattern='\\\\d+[xX]', sample_size=None, seed=42):\\n```\",\"libs\":\"['pandas', 'random']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}