plot_nps
plot_nps(data=None, value=None, title=None)NPS distribution slide (0-10 scale with group labels).
The canonical Net Promoter Score chart: the full 0-10 recommendation distribution as labelled bars coloured by NPS group, with the detractor / passive / promoter shares called out across the top and the overall NPS in the title. Unlike plot_nps_gauge() (which takes a single score), this reads the raw 0-10 column; it is the detailed companion slide to the gauge.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | pandas.DataFrame | A data frame. If omitted, the session default is used. | None |
| value | str | The 0-10 recommendation column. Text such as “8 - likely” is salvaged with ensure_numeric(). |
None |
| title | str | Title; defaults to “Net Promoter Score of: |
None |
Returns
| Name | Type | Description |
|---|---|---|
| plotnine.ggplot | The chart. |
See Also
calc_nps, plot_nps_gauge
Examples
>>> plot_nps(podracing_survey, "nps_value")