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

Make merge a function as well as a method #417

Closed
shoyer opened this issue Jun 1, 2015 · 1 comment · Fixed by #857
Closed

Make merge a function as well as a method #417

shoyer opened this issue Jun 1, 2015 · 1 comment · Fixed by #857

Comments

@shoyer
Copy link
Member

shoyer commented Jun 1, 2015

Roughly speaking, this should look like:

from functools import reduce

def merge(datasets, **kwargs):
    return reduce(lambda x, y: x.merge(y, **kwargs), datasets)

We use already use this in auto_combine.

Including it would make for a better user experience that requiring users to write it themselves.

@shoyer
Copy link
Member Author

shoyer commented Dec 15, 2015

As pointed out in #679, it would be nice to handle DataArray objects (keyed by their name) in the list of datasets to merge, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant