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

Assign default group name in groupby if name=None (#158) #4098

Merged
merged 2 commits into from
May 30, 2020

Conversation

pjbutcher
Copy link
Contributor

Ran across the issue describe in #158 the other day and decided to implement Stephan's suggestion of assigning a default name of 'group' to the DataArray passed to groupby if name=None. Previously when name=None on the DataArray a ValueError: group must have a name was raised.

This is my first pull request so let me know if I missed anything. Thanks!

* When groupby receives a DataArray with name=None assign name='group'

* Previously when name=None a ValueError: `group` must have a name was raised

* Closes pydata#158

* Add test

* Update whats-new.rst

* black
Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pjbutcher. This looks good to me.

I see this is your first xarray PR. Welcome!

@dcherian
Copy link
Contributor

Thanks @pjbutcher

@dcherian dcherian merged commit 73b013f into pydata:master May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

groupby should work with name=None
2 participants