slice_chunks#

coffea.dataset_tools.slice_chunks(fileset: LimitStepsProtocol | DataGroupSpec, theslice: Any = slice(None, None, None), bydataset: bool = True) DataGroupSpec[source]#

Modify the input fileset so that only the chunks of each file or each dataset specified by the input slice are processed.

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

  • theslice (Any, default slice(None)) – How to slice the array of row-ranges (steps) in the input fileset.

  • bydataset (bool, default True) – If True, slices across all steps in all files in each dataset, otherwise slices each file individually.

Returns:

out – The reduced fileset with only the row-ranges specified by theslice left.

Return type:

DataGroupSpec