apply_to_dataset

coffea.dataset_tools.apply_to_dataset(data_manipulation: ~coffea.processor.processor.ProcessorABC | ~typing.Callable[[~dask_awkward.lib.core.Array], ~dask.base.DaskMethodsMixin | ~typing.Dict[~typing.Hashable, ~dask.base.DaskMethodsMixin] | ~typing.Set[~dask.base.DaskMethodsMixin] | ~typing.List[~dask.base.DaskMethodsMixin] | ~typing.Tuple[~dask.base.DaskMethodsMixin] | ~typing.Tuple[~dask.base.DaskMethodsMixin | ~typing.Dict[~typing.Hashable, ~dask.base.DaskMethodsMixin] | ~typing.Set[~dask.base.DaskMethodsMixin] | ~typing.List[~dask.base.DaskMethodsMixin] | ~typing.Tuple[~dask.base.DaskMethodsMixin], ...]], dataset: ~coffea.dataset_tools.preprocess.DatasetSpec | ~coffea.dataset_tools.preprocess.DatasetSpecOptional, schemaclass: ~coffea.nanoevents.schemas.base.BaseSchema = <class 'coffea.nanoevents.schemas.nanoaod.NanoAODSchema'>, metadata: dict[~typing.Hashable, ~typing.Any] = {}, uproot_options: dict[str, ~typing.Any] = {}) DaskMethodsMixin | Dict[Hashable, DaskMethodsMixin] | Set[DaskMethodsMixin] | List[DaskMethodsMixin] | Tuple[DaskMethodsMixin] | Tuple[DaskMethodsMixin | Dict[Hashable, DaskMethodsMixin] | Set[DaskMethodsMixin] | List[DaskMethodsMixin] | Tuple[DaskMethodsMixin], ...] | tuple[DaskMethodsMixin | Dict[Hashable, DaskMethodsMixin] | Set[DaskMethodsMixin] | List[DaskMethodsMixin] | Tuple[DaskMethodsMixin] | Tuple[DaskMethodsMixin | Dict[Hashable, DaskMethodsMixin] | Set[DaskMethodsMixin] | List[DaskMethodsMixin] | Tuple[DaskMethodsMixin], ...], Array][source]

Apply the supplied function or processor to the supplied dataset. :param data_manipulation: The user analysis code to run on the input dataset :type data_manipulation: ProcessorABC or GenericHEPAnalysis :param dataset: The data to be acted upon by the data manipulation passed in. :type dataset: DatasetSpec | DatasetSpecOptional :param schemaclass: The nanoevents schema to interpret the input dataset with. :type schemaclass: BaseSchema, default NanoAODSchema :param metadata: Metadata for the dataset that is accessible by the input analysis. Should also be dask-serializable. :type metadata: dict[Hashable, Any], default {} :param uproot_options: Options to pass to uproot. Pass at least {“allow_read_errors_with_report”: True} to turn on file access reports. :type uproot_options: dict[str, Any], default {}

Returns:

  • out (DaskOutputType) – The output of the analysis workflow applied to the dataset

  • report (dask_awkward.Array, optional) – The file access report for running the analysis on the input dataset. Needs to be computed in simultaneously with the analysis to be accurate.