twoHelixestwoHelixes Start free

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.

Question compare mean radius by diagnosis
Mean radius by diagnosis051015benignmalignantDiagnosis
Breast cancer diagnostic — 2 rows charted from 569, drawn as a bar
How it decided
Finding the data130 ms

Breast cancer diagnostic: 569 rows, 31 columns. diagnosis and mean_radius.

Shaping the data6 ms

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.

Choosing the chart5 ms

bar. One measure across two groups: bars.

Applying defaults1 ms

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.

diagnosismean_radius
benign12.1465
malignant17.4628