slice_files

coffea.dataset_tools.slice_files(fileset: Dict[str, DatasetSpec], theslice: Any = slice(None, None, None)) Dict[str, DatasetSpec][source]

Modify the input dataset so that only the files of each dataset specified by the input slice are processed.

Parameters:
  • fileset (FilesetSpec) – The set of datasets to be sliced.

  • theslice (Any, default slice(None)) – How to slice the array of files in the input datasets. We slice in key-order.

Returns:

out – The reduce fileset with only the files specified by theslice left.

Return type:

FilesetSpec