Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a groupby argument to the histogram operation #1725

Merged
merged 2 commits into from
Jul 15, 2017
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jul 14, 2017

As suggested in #1716 we should have an easier way to generate a grouped/faceted histogram. The current approach is as follows:

hv.Dataset(autompg).groupby('cyl').hist(dimension='mpg', adjoin=False).overlay()

For simplicities sake I suggest adding this:

hv.Dataset(autompg).hist(dimension='mpg', groupby='cyl', adjoin=False)

OR

histogram(hv.Dataset(autompg), dimension='mpg', groupby='cyl')

bokeh_plot 90

Going to add gallery demos before this is ready to merge.

@philippjfr philippjfr added the type: feature A major new feature label Jul 14, 2017
@jlstevens
Copy link
Contributor

jlstevens commented Jul 14, 2017

Is a nice exception raised if you try to groupby dimensions that are not available/make no sense?

@philippjfr
Copy link
Member Author

Just the usual exception raised when a dimension is not found:

KeyError: u'Dimension cylinder not found'

@jlstevens
Copy link
Contributor

Maybe groupby should be explicitly listed as an argument of .hist so you can see this argument exists when inspecting the signature (instead of just seeing **kwargs).

@philippjfr
Copy link
Member Author

Let's merge this now, you've already opened an issue to make the .hist signatures more consistent.

@jlstevens
Copy link
Contributor

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A major new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants