我正在用Python学习乳腺癌分类数据集。我正在尝试为每个特征绘制直方图,如何将这些直方图分为三组?就像下面的截图一样:

这是我使用的代码:
from sklearn.datasets import load_breast_cancer # sample data
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
data = load_breast_cancer()
# Turn the feature data into a dataframe
df = pd.DataFrame(data.data, columns = data.feature_names)
# Add the target columns, and fill it with the target data
df["target"] = data.target
# display(df.head())
mean radius mean texture mean perimeter mean area mean smoothness mean compactness mean concavity mean concave points mean symmetry mean fractal dimension radius error …Run Code Online (Sandbox Code Playgroud)