-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
We have the following snippet
for scen in scenarios_incl_hist:
files = fc_all.search(scenario=scen)
# load all members for a scenario
for fN, meta in files.items():
ds = xr.open_dataset(fN)with groupby we could do the following instead:
for scen, fc_scen in fc.groupby("scen"):
# load all members for a scenario
for fN, meta in fc_scen.items():
ds = xr.open_dataset(fN)A "working" example using groupby of the underlying pandas DataFrame:
import filefisher
ff = filefisher.FileFinder("", "{scen}.nc", test_paths=["hist.nc", "ssp126", "ssp585.nc"])
fc = ff.find_files()
for scen, df in fc.df.groupby("scen"):
for fN, meta in df.iterrows():
print(fN)Metadata
Metadata
Assignees
Labels
No labels