Bokeh [naturally interprets Pandas group-by objects](https://docs.bokeh.org/en/latest/docs/user_guide/data.html#pandas-groupby), making it very easy to plot series for datasets where each row defines one data point for a single group. As an example, take the [Vizier Getting Started Bokeh Example](https://github.com/VizierDB/web-ui/wiki/Getting-Started#python-cells). Over half the code in the script is used solely to break the dataset down into groups. By comparison, if the dataset were coming from Pandas, the following line would supplant nearly everything: ``` source = ds.groupby(['COUNTY']) ``` I propose adding a `group_by` optional parameter for `to_bokeh` so that the following line has the same behavior: ``` source = vizierdb.get_dataset('ticks').to_bokeh(group_by = ['COUNTY']) ```
Bokeh naturally interprets Pandas group-by objects, making it very easy to plot series for datasets where each row defines one data point for a single group. As an example, take the Vizier Getting Started Bokeh Example.
Over half the code in the script is used solely to break the dataset down into groups.
By comparison, if the dataset were coming from Pandas, the following line would supplant nearly everything:
I propose adding a
group_byoptional parameter forto_bokehso that the following line has the same behavior: