filter_files
- coffea.dataset_tools.filter_files(fileset: ~typing.Dict[str, ~coffea.dataset_tools.preprocess.DatasetSpec], thefilter: ~typing.Callable[[tuple[str, ~coffea.dataset_tools.preprocess.CoffeaFileSpec]], bool] = <function _default_filter>) Dict[str, DatasetSpec] [source]
Modify the input dataset so that only the files of each dataset that pass the filter remain. :param fileset: The set of datasets to be sliced. :type fileset: FilesetSpec :param thefilter: How to filter the files in the each dataset. :type thefilter: Callable[[tuple[str, CoffeaFileSpec]], bool], default filters empty files
- Returns:
out – The reduce fileset with only the files specified by thefilter left.
- Return type:
FilesetSpec