benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf 1cc7f39b-45ff-533a-84bf-0df4a4d2c5a0

Problem

Answer published by the source. Consult the official source to check your work against its answer.

complete prompt

import pandas as pd
import seaborn as sns

def task_func(data):
    """
    Creates and return a heatmap of the cumulative sum of each column in a dictionary.

    Parameters:
    - data (dict): A dictionary where the keys are the column names and the values are the column values.

    Returns:
    - matplotlib.axes._axes.Axes: The Axes object of the Seaborn heatmap.

    Raises:
    - ValueError: If the DataFrame is empty or if no numeric columns are present.

    Requirements:
    - pandas
    - seaborn

    Notes:
    - Only numeric columns are considered for the heatmap. Non-numeric columns are ignored.

    Example:
    >>> data = {'A': [1, 2, 3], 'B': [4, 5, 6]}
    >>> ax = task_func(data)
    """

instruct prompt

Creates and return a heatmap of the cumulative sum of each column in a dictionary.
Note that: Notes: Only numeric columns are considered for the heatmap. Non-numeric columns are ignored.
The function should raise the exception for: ValueError: If the DataFrame is empty or if no numeric columns are present.
The function should output with:
    matplotlib.axes._axes.Axes: The Axes object of the Seaborn heatmap.
You should write self-contained code starting with:

Code

import pandas as pd
import seaborn as sns
def task_func(data):

code prompt

Code

import pandas as pd
import seaborn as sns
def task_func(data):

entry point

task_func

libs

  • pandas
  • seaborn

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import