verticapy.vDataColumn.kurtosis#
- vDataColumn.kurtosis() bool | float | str | timedelta | datetime #
Calculates the kurtosis of the vDataColumn to obtain a measure of the data’s peakedness or tailness. The kurtosis statistic helps us understand the shape of the data distribution. It quantifies whether the data has heavy tails or is more peaked relative to a normal distribution.
By aggregating the vDataColumn with kurtosis, we can gain valuable insights into the data’s distribution characteristics.
Warning
To compute kurtosis, 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 kurtosis is typically slower than some other types of aggregations.
Returns#
- PythonScalar
kurtosis
Examples#
For this example, let’s generate a dataset and calculate the kurtosis 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"].kurtosis() Out[3]: -1.44661035091946
Note
All the calculations are pushed to the database.
Hint
For more precise control, please refer to the
aggregate
method.See also
vDataColumn.
std()
: Standard Deviation for a specific column.vDataFrame.
kurtosis()
: Kurtosis for particular columns.