vastorbit.VastFrame.std¶
- VastFrame.std(columns: Annotated[str | list[str], 'STRING representing one column or a list of columns'] | None = None, **agg_kwargs) TableSample¶
Aggregates the VastFrame using
STDDEVaggregation (Standard Deviation), providing insights into the spread or variability of data for the selected columns. The standard deviation is a measure of how much individual data points deviate from the mean, helping to assess data consistency and variation.- 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 standard deviation for specific columns.
data.std( columns = ["x", "y", "z"], )
stddev "x" 8.016723591521485 "y" 0.5175491695067657 "z" 4.464142854857069 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.VastFrame.skewness(): Skewness for particular columns.VastColumn.std(): Standard Deviation for a specific column.