vastorbit.VastFrame.skewness¶
- VastFrame.skewness(columns: Annotated[str | list[str], 'STRING representing one column or a list of columns'] | None = None, **agg_kwargs) TableSample¶
Utilizes the
skewnessaggregation method to analyze and aggregate the VastFrame. 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.
- Parameters:
columns (SQLColumns, optional) – List of the VastColumns names. If empty, all numerical VastColumns are used.
**agg_kwargs – Any optional parameter to pass to the Aggregate function.
- Returns:
result.
- Return type:
Examples
For this example, we will use the following dataset:
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], } )
Now, let’s calculate the skewness for specific columns.
data.skewness( columns = ["x", "y", "z"], )
skewness "x" 0.2633597255982841 "y" 0.5163977794943223 "z" 0.13518678647176613 Rows: 1-3 | Columns: 2Note
All the calculations are pushed to the database.
Hint
For more precise control, please refer to the
aggregatemethod.See also
VastColumn.kurtosis(): Kurtosis for a specific column.VastColumn.skewness(): Skewness for a specific column.VastFrame.std(): Standard Deviation for particular columns.