Loading...

verticapy.vDataColumn.skewness#

vDataColumn.skewness() bool | float | str | timedelta | datetime#

Utilizes the skewness aggregation method to analyze and aggregate the vDataColumn. 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 vDataFrame 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, VerticaPy 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#

PythonScalar

skewness

Examples#

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

import verticapy as vp

data = vp.vDataFrame(
    {
        "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()
Out[3]: 0.328467287554527

Note

All the calculations are pushed to the database.

Hint

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

See also

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