scipp.GroupByDataset

class scipp.GroupByDataset

GroupBy object implementing to split-apply-combine mechanism.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

all(self, dim)

Element-wise all over the specified dimension within a group.

any(self, dim)

Element-wise any over the specified dimension within a group.

concat(self, dim)

Element-wise concat over the specified dimension within a group.

copy(self, group)

Extract group as new data array or dataset.

max(self, dim)

Element-wise max over the specified dimension within a group.

mean(self, dim)

Element-wise mean over the specified dimension within a group.

min(self, dim)

Element-wise min over the specified dimension within a group.

sum(self, dim)

Element-wise sum over the specified dimension within a group.

Attributes

bins

all(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise all over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the all.

Returns

The computed all over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset

any(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise any over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the any.

Returns

The computed any over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset

concat(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise concat over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the concat.

Returns

The computed concat over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset

copy(self: scipp._scipp.core.GroupByDataset, group: int) scipp._scipp.core.Dataset

Extract group as new data array or dataset.

Parameters

group – Index of groupy to extract

Return type

Dataset

max(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise max over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the max.

Returns

The computed max over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset

mean(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise mean over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the mean.

Returns

The computed mean over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset

min(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise min over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the min.

Returns

The computed min over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset

sum(self: scipp._scipp.core.GroupByDataset, dim: scipp._scipp.core.Dim) scipp._scipp.core.Dataset

Element-wise sum over the specified dimension within a group.

Parameters

dim (Dim) – Dimension to reduce when computing the sum.

Returns

The computed sum over each group, combined along the dimension specified when calling scipp.groupby().

Return type

Dataset