Datasets / Breast cancer diagnostic
Mean nucleus radius by diagnosis
Two groups and one measure. Two bars is close to a number, and the chart earns its place only because the gap is the point.
How it decided
Breast cancer diagnostic: 569 rows, 31 columns. diagnosis and mean_radius.
569 rows in, 2 out across 2 columns. Two groups and one measure. Two bars is close to a number, and the chart earns its place only because the gap is the point.
bar. One measure across two groups: bars.
Palette, spacing, axis titles and legend placement applied. 0 issues found.
The transformation
This is the code, not a description of it — the chart above was drawn from what it returns, and the notebook download runs the same lines against the same file.
result = df.groupby("diagnosis", as_index=False)["mean_radius"].mean()
What it charted
2 rows out of 569, 2 columns. First 2 shown.
| diagnosis | mean_radius |
|---|---|
| benign | 12.1465 |
| malignant | 17.4628 |