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

Add keys_info() method #515

Merged
merged 2 commits into from
Aug 26, 2022
Merged

Add keys_info() method #515

merged 2 commits into from
Aug 26, 2022

Conversation

andersy005
Copy link
Member

Change Summary

This PR adds a .keys_info() method as requested by @matt-long in #461. It returns a dataframe in which the keys are index and the columns are the groupby attributes.

In [1]: import intake

In [2]: cat = intake.open_esm_datastore("./tests/sample-catalogs/cesm1-lens-netcdf.json")

In [3]: cat.keys_info()
Out[3]: 
                component experiment stream
key                                        
ocn.20C.pop.h         ocn        20C  pop.h
ocn.CTRL.pop.h        ocn       CTRL  pop.h
ocn.RCP85.pop.h       ocn      RCP85  pop.h

Related issue number

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable

@andersy005 andersy005 added the enhancement Issues that are found to be a reasonable candidate feature additions label Aug 26, 2022
@andersy005 andersy005 added this to the August 2022 Release milestone Aug 26, 2022
@andersy005 andersy005 enabled auto-merge (squash) August 26, 2022 06:14
@andersy005 andersy005 merged commit 769addf into main Aug 26, 2022
@andersy005 andersy005 deleted the keys_dict branch August 26, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that are found to be a reasonable candidate feature additions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add method to return information about catalog.keys()
1 participant