verticapy.vDataFrame.std#
- vDataFrame.std(columns: str | list[str] | None = None, **agg_kwargs) TableSample #
Aggregates the vDataFrame using
STDDEV
aggregation (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 vDataColumns names. If empty, all numerical vDataColumns are used.
- **agg_kwargs
Any optional parameter to pass to the Aggregate function.
Returns#
- TableSample
result.
Examples#
For this example, we will use the following dataset:
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], } )
Now, let’s calculate the standard deviation for specific columns.
data.std( columns = ["x", "y", "z"], )
stddev "x" 8.01672359152148 "y" 0.517549169506766 "z" 4.46414285485707 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.vDataColumn.
std()
: Standard Deviation for a specific column.