Average bounce rate by source
Bounce rate is already a rate, so the sessions are averaged, never summed - a summed rate is a meaningless number.
How it decided
Web traffic: 1,825 rows, 6 columns. source and bounce_rate.
1,825 rows in, 5 out across 2 columns. Bounce rate is already a rate, so the sessions are averaged, never summed - a summed rate is a meaningless number.
bar. One measure across a few named categories: bars, sorted.
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("source", as_index=False)["bounce_rate"].mean()
result["bounce_rate"] = result["bounce_rate"] * 100
result = result.sort_values("bounce_rate")
What it charted
5 rows out of 1,825, 2 columns. First 5 shown.
| source | bounce_rate |
|---|---|
| Paid | 41.065 |
| Organic | 41.6912 |
| Referral | 41.8277 |
| Social | 41.9314 |
| Direct | 42.6668 |