Loading...

vastorbit.VastColumn.skewness

VastColumn.skewness() Annotated[bool | float | str | timedelta | datetime, 'Python Scalar']

Utilizes the skewness aggregation method to analyze and aggregate the VastColumn. Skewness, a measure of the asymmetry in the data’s distribution, helps us understand the data’s deviation from a perfectly symmetrical distribution. When we aggregate the VastFrame using skewness, we gain insights into the data’s tendency to be skewed to the left or right, or if it follows a normal distribution.

Warning

To compute skewness, vastorbit needs to execute multiple queries. It necessitates, at a minimum, a query that includes a subquery to perform this type of aggregation. This complexity is the reason why calculating skewness is typically slower than some other types of aggregations.

Returns:

skewness

Return type:

PythonScalar

Examples

For this example, let’s generate a dataset and calculate the skewness of a column:

import vastorbit as vo

data = vo.VastFrame(
    {
        "x": [1, 2, 4, 9, 10, 15, 20, 22],
        "y": [1, 2, 1, 2, 1, 1, 2, 1],
        "z": [10, 12, 2, 1, 9, 8, 1, 3],
    }
)
data["x"].skewness()

Note

All the calculations are pushed to the database.

Hint

For more precise control, please refer to the aggregate method.

See also

VastColumn.kurtosis() : Kurtosis for a specific column.
VastFrame.skewness() : Skewness for particular columns.
VastFrame.std() : Standard Deviation for particular columns.