benchmarks.wiki / Public workspace
BigCodeBench / BigCodeBench v0.1.0_hf d8eef2cc-b3ff-586d-b03e-d3f841aba2ef
Problem
Answer published by the source. Consult the official source to check your work against its answer.
complete prompt
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
from sklearn.datasets import load_diabetes
def task_func():
"""
Draws a seaborn pairplot for the diabetes dataset obtained from sklearn.datasets.
This function sets the font to Arial. It then loads the diabetes dataset into a
DataFrame and creates a pairplot using seaborn, which is useful for visual exploration
of relationships between different features in the dataset.
Requirements:
- matplotlib.pyplot
- seaborn
- sklearn.datasets.load_diabetes
- pandas
Returns:
matplotlib.figure.Figure: A matplotlib Figure instance representing the created pairplot.
pd.DataFrame: a DataFrame representation of the diabetes dataset
Examples:
>>> fig, df = task_func()
>>> isinstance(fig, plt.Figure)
True
>>> isinstance(df, pd.DataFrame)
True
>>> type(fig).__name__
'Figure'
"""
instruct prompt
Draws a seaborn pairplot for the diabetes dataset obtained from sklearn.datasets. This function sets the font to Arial. It then loads the diabetes dataset into a DataFrame and creates a pairplot using seaborn, which is useful for visual exploration of relationships between different features in the dataset.
The function should output with:
matplotlib.figure.Figure: A matplotlib Figure instance representing the created pairplot.
pd.DataFrame: a DataFrame representation of the diabetes dataset
You should write self-contained code starting with:
Code
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
from sklearn.datasets import load_diabetes
def task_func():
code prompt
Code
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
from sklearn.datasets import load_diabetes
def task_func():
entry point
task_func
libs
- pandas
- sklearn
- matplotlib
- seaborn
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
initial import