Select a table column

Select a specific table column using a Table Column expression.

Output column name

import vitalx.aggregation as va

va.select(va.Sleep.col("efficiency"))

Perform an analysis and select the output value

Perform data analysis with in-built algorithms using value macro expressions:

Output column name

import vitalx.aggregation as va

va.select(va.Sleep.chronotype())

Aggregate a table column

Aggregate a Table Column expression with respect to the group_by clause.

The specified aggregate function is applied to each and every group created by the group_by clause. The result set is N aggregated values where N is the number of groups.

Statistical functions

Math functions

Output column name

import vitalx.aggregation as va

va.select(
    va.Sleep.col("stage_asleep_second").newest()
)

Select the Index Column

Select the primary datetime index of the table using the Index Column expression.

Output column name

import vitalx.aggregation as va

va.select(va.Sleep.col("efficiency"))

Select the Group Key Columns

Select the Group Key Columns associated with the group_by clause.

You can select one specific group key column by offset, or select all group key columns with a * wildcard.

Output column name

import vitalx.aggregation as va

# Select all group key columns
va.select(va.group_key("*"))

# Select the 2nd group key column
va.select(va.group_key(2))

Select a table column

Select a specific table column using a Table Column expression.

Output column name

import vitalx.aggregation as va

va.select(va.Sleep.col("efficiency"))

Perform an analysis and select the output value

Perform data analysis with in-built algorithms using value macro expressions:

Output column name

import vitalx.aggregation as va

va.select(va.Sleep.chronotype())

Aggregate a table column

Aggregate a Table Column expression with respect to the group_by clause.

The specified aggregate function is applied to each and every group created by the group_by clause. The result set is N aggregated values where N is the number of groups.

Statistical functions

Math functions

Output column name

import vitalx.aggregation as va

va.select(
    va.Sleep.col("stage_asleep_second").newest()
)

Select the Index Column

Select the primary datetime index of the table using the Index Column expression.

Output column name

import vitalx.aggregation as va

va.select(va.Sleep.col("efficiency"))

Select the Group Key Columns

Select the Group Key Columns associated with the group_by clause.

You can select one specific group key column by offset, or select all group key columns with a * wildcard.

Output column name

import vitalx.aggregation as va

# Select all group key columns
va.select(va.group_key("*"))

# Select the 2nd group key column
va.select(va.group_key(2))