benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf 82c0e42f-4ce2-5556-b855-8804b5c7c49a

Problem

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

complete prompt

import pandas as pd
from sklearn.preprocessing import MinMaxScaler

def task_func(data_path):
    """
    Normalizes a dataset from a .csv file.
    
    Parameters:
    - data_path (str): The path to the csv data file.

    Returns:
    - df (DataFrame): The normalized dataset.

    Requirements:
    - pandas
    - sklearn
    
    Example:
    >>> df = task_func('path_to_data_file.csv')
    """

instruct prompt

Normalizes a dataset from a .csv file.
The function should output with:
    df (DataFrame): The normalized dataset.
You should write self-contained code starting with:

Code

import pandas as pd
from sklearn.preprocessing import MinMaxScaler
def task_func(data_path):

code prompt

Code

import pandas as pd
from sklearn.preprocessing import MinMaxScaler
def task_func(data_path):

entry point

task_func

libs

  • pandas
  • sklearn

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