Skip to content

Type alias

ipyvizzu.data.type_alias

This module provides typing aliases for data used in ipyvizzu.

ipyvizzu.data.type_alias.DimensionValue = str module-attribute

Represents a value that can be either a string or a number, but both will be treated as strings.

ipyvizzu.data.type_alias.MeasureValue = Union[int, float] module-attribute

Represents a numerical value, which can be either an int or a float.

ipyvizzu.data.type_alias.NestedMeasureValues = Union[MeasureValue, List['NestedMeasureValues']] module-attribute

Represents a nested structure of MeasureValues. It can be a single MeasureValue or a list containing other NestedMeasureValues.

ipyvizzu.data.type_alias.RecordValue = Union[DimensionValue, MeasureValue] module-attribute

Represents a value that can be either a DimensionValue or a MeasureValue.

ipyvizzu.data.type_alias.Record = Union[List[RecordValue], Dict[str, RecordValue]] module-attribute

Represents a Record, which is a collection of RecordValues. A Record can be represented as either a list of RecordValues or a dictionary where keys are series names and values are the corresponding RecordValues.

ipyvizzu.data.type_alias.SeriesValues = Union[Sequence[DimensionValue], Sequence[MeasureValue]] module-attribute

Represents a collection of values for a Series. It can be a list of DimensionValues or a list of MeasureValues.

ipyvizzu.data.type_alias.Series = Dict[str, Union[str, SeriesValues]] module-attribute

Represents a Series in a dictionary format. It consists of a name (string), an optional type (also a string), and a values key which contains a SeriesValues.