Searching a catalog for all but one value? #513
-
Hi Intake team, I'm searching the Pangeo CMIP6 catalog with the following:
But for regridding reasons, there is a model I don't want to include ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
thank you for your patience, @r-ford.
One way to do this is via a regular expression In [35]: url
Out[35]: 'https://raw.githubusercontent.com/intake/intake-esm/main/tutorial-catalogs/GOOGLE-CMIP6.json'
In [36]: cat = intake.open_esm_datastore(url)
In [43]: cat.df.source_id.unique()
Out[43]: array(['IPSL-CM6A-LR', 'CanESM5'], dtype=object) In [42]: cat.search(source_id='^((?!IPSL-CM6A-LR).)*$').df.source_id.unique()
Out[42]: array(['CanESM5'], dtype=object)
|
Beta Was this translation helpful? Give feedback.
thank you for your patience, @r-ford.
One way to do this is via a regular expression
'^((?!IPSL-CM6A-LR).)*$'
excludes all rows containingIPSL-CM6A-LR
insource_id
…