# BigCodeBench / 

task_id: 6a412d36-bb71-5224-9d17-ff9515993277
task_key: default--v0~2e1~2e0~5fhf--6a412d36-bb71-5224-9d17-ff9515993277
task_revision_id: 1

{"code_prompt":"import pandas as pd\nimport logging\n# Set up basic configuration for logging\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')\ndef task_func(sheet_name, excel_file_location=\"test.xlsx\", csv_file_location=\"test.csv\"):\n","complete_prompt":"import pandas as pd\nimport logging\n\n# Set up basic configuration for logging\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')\n\ndef task_func(sheet_name, excel_file_location=\"test.xlsx\", csv_file_location=\"test.csv\"):\n    \"\"\"\n    Reads data from an Excel spreadsheet, converts it to a CSV file, then calculates the sum of each column in the CSV file.\n\n    Parameters:\n    - sheet_name (str): The name of the sheet to load data from.\n    - excel_file_location (str): The path to the Excel file. Default is 'test.xlsx'.\n    - csv_file_location (str): The path where the CSV file will be saved. Default is 'test.csv'.\n\n    Returns:\n    - dict: A dictionary with the sum of each column.\n\n    Raises:\n    - FileNotFoundError: If the Excel file does not exist at the specified path.\n    - ValueError: If the specified sheet name is not found in the Excel file.\n\n    Requirements:\n    - pandas\n    - logging\n\n    Example:\n    >>> test_excel_file = 'dummy_test.xlsx'\n    >>> test_csv_file = 'dummy_test.csv'\n    >>> test_sheet_name = 'TestSheet'\n    >>> data = {'A': [10, 20, 30], 'B': [40, 50, 60]}\n    >>> df = pd.DataFrame(data)\n    >>> df.to_excel(test_excel_file, sheet_name=test_sheet_name, index=False)\n    >>> task_func(sheet_name='TestSheet', excel_file_location=test_excel_file, csv_file_location=test_csv_file) # {'Column1': sum_value1, 'Column2': sum_value2, ...}\n    {'A': 60, 'B': 150}\n    >>> os.remove(test_excel_file)\n    >>> os.remove(test_csv_file)\n    \n    Note:\n    - Ensure the Excel file contains only numerical data for accurate sum calculations.\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Reads data from an Excel spreadsheet, converts it to a CSV file, then calculates the sum of each column in the CSV file.\nNote that: Ensure the Excel file contains only numerical data for accurate sum calculations.\nThe function should raise the exception for: FileNotFoundError: If the Excel file does not exist at the specified path. ValueError: If the specified sheet name is not found in the Excel file.\nThe function should output with:\n    dict: A dictionary with the sum of each column.\nYou should write self-contained code starting with:\n```\nimport pandas as pd\nimport logging\n# Set up basic configuration for logging\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')\ndef task_func(sheet_name, excel_file_location=\"test.xlsx\", csv_file_location=\"test.csv\"):\n```","libs":"['pandas', 'logging']"}

Source: https://bigcode-bench.github.io/

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=6a412d36-bb71-5224-9d17-ff9515993277&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
