std
Returns the standard deviation of the values in this DataColumn, as a Double.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
When there is nothing to compute the standard deviation of, for instance, when the input is empty or contains only null values, the result is Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See also:
— the standard deviation of the values an expression returns for each element.stdOf— the mean of the values in this column.meanThe Std Operation— an overview of allstdmodes.
For more information: See std on the documentation website.
Example
// The standard deviation of all ages in the "age" Int column
df.age.std()
// The population standard deviation of all weights in the "weight" `Double?` column
df.weight.std(ddof = 0)Return
The standard deviation of the values in this column, as a Double.
Parameters
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Returns the standard deviation of the values of each suitable column of this DataFrame separately.
All columns of a primitive number type (and all "mixed" Number columns) are taken into account; the other columns are simply left out of the result.
Columns inside column groups are also excluded. To include those in the standard deviation, flatten the DataFrame first.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See also:
— the same, but for an explicit selection of columns.stdForstd{ columns }— a single standard deviation of all values in the selected columns.mean()— the mean of each column.The Std Operation— an overview of allstdmodes.
For more information: See std on the documentation website.
Example
// A single row with the standard deviation of each number column ("age" and "weight")
df.std()Return
A single DataRow with the standard deviation of each suitable column of this DataFrame.
Parameters
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Returns a single standard deviation of all the values in the selected columns of this DataFrame, as a Double.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
When there is nothing to compute the standard deviation of, for instance, when the input is empty or contains only null values, the result is Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See also:
— the standard deviation of each selected column separately.stdFor— the standard deviation of the values a row expression returns for each row.stdOfmean{ columns }— the mean of means of the selected columns.The Std Operation— an overview of allstdmodes.
For more information: See std on the documentation website.
Select or express columns using the Columns Selection DSL.
This DSL is initiated by a Columns Selector lambda, which operates in the context of the Columns Selection DSL and expects you to return a SingleColumn or ColumnSet (so, a ColumnsResolver). This is an entity formed by calling any (combination) of the functions in the DSL that is or can be resolved into one or more columns.
The Columns Selection DSL allows using Extension Properties for specifying columns type- and name-safe.
Check out: Columns Selection DSL Grammar
See Column Selectors on the documentation website.
Example
// The standard deviation of all values in the "age" and "weight" columns together
df.std { age and weight }Return
The standard deviation of all the values in the selected columns, as a Double.
Parameters
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
The ColumnsSelector used to select the columns to compute the standard deviation of.
Returns a single standard deviation of all the values in the selected columns of this DataFrame, as a Double.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
When there is nothing to compute the standard deviation of, for instance, when the input is empty or contains only null values, the result is Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See also:
— the standard deviation of each selected column separately.stdFor— the standard deviation of the values a row expression returns for each row.stdOfmean(columns)— the mean of means of the selected columns.The Std Operation— an overview of allstdmodes.
For more information: See std on the documentation website.
Select single or multiple columns using their names as Strings. (String API).
Example
// The standard deviation of all values in the "age" and "weight" columns together
df.std("age", "weight")Return
The standard deviation of all the values in the selected columns, as a Double.
Parameters
The names of the columns to compute the standard deviation of. These must be existing columns holding only primitive numbers, else an IllegalStateException or IllegalArgumentException is thrown.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Aggregates this GroupBy by computing the standard deviation of the values of each suitable column separately, per group.
Returns a new DataFrame with one row per group, containing the group key columns and a column with the standard deviation for each suitable column.
All columns of a primitive number type (and all "mixed" Number columns) are taken into account; the other columns are simply left out of the result.
Columns inside column groups are also excluded. To include those in the standard deviation, flatten the DataFrame first.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See also:
— the same, but for an explicit selection of columns.stdForstd{ columns }— a single standard deviation of all values in the selected columns, per group.mean()— the mean of each column, per group.— the general way to aggregate groups.aggregateThe Std Operation— an overview of allstdmodes.
For more information: See "groupBy statistics" on the documentation website., and See "GroupBy Aggregation Statistics" on the documentation website.
Example
// For each city, the standard deviation of each number column ("age" and "weight")
df.groupBy { city }.std()Return
A new DataFrame with the group keys and the standard deviation of each suitable column per group.
Parameters
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Aggregates this GroupBy by computing a single standard deviation of all the values in the selected columns, per group.
Returns a new DataFrame with one row per group, containing the group key columns and a single column with the standard deviation per group. That column is named name, or, if name is null, after the selected column if exactly one column is selected, and "std" otherwise.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See Selecting Columns.
See also:
— the standard deviation of each selected column separately, per group.stdFor— the standard deviation of the values a row expression returns for each row of a group.stdOf— the general way to aggregate groups.aggregateThe Std Operation— an overview of allstdmodes.
For more information: See "groupBy statistics" on the documentation website., and See "GroupBy Aggregation Statistics" on the documentation website.
Example
// For each city, the standard deviation of all values in the "age" and "weight" columns,
// in a column called "deviation"
df.groupBy { city }.std("deviation") { age and weight }Return
A new DataFrame with the group keys and a single standard deviation per group.
Parameters
The name of the resulting column. If null (the default), the name of the selected column is used if exactly one column is selected, and "std" otherwise. This name needs to be unique, else a DuplicateColumnPathInsertException is thrown.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
The ColumnsSelector used to select the columns to compute the standard deviation of.
Aggregates this GroupBy by computing a single standard deviation of all the values in the selected columns, per group.
Returns a new DataFrame with one row per group, containing the group key columns and a single column with the standard deviation per group. That column is named name, or, if name is null, after the selected column if exactly one column is selected, and "std" otherwise.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See Selecting Columns.
See also:
— the standard deviation of each selected column separately, per group.stdFor— the standard deviation of the values a row expression returns for each row of a group.stdOf— the general way to aggregate groups.aggregateThe Std Operation— an overview of allstdmodes.
For more information: See "groupBy statistics" on the documentation website., and See "GroupBy Aggregation Statistics" on the documentation website.
Example
// For each city, the standard deviation of all values in the "age" and "weight" columns,
// in a column called "deviation"
df.groupBy { city }.std("age", "weight", name = "deviation")Return
A new DataFrame with the group keys and a single standard deviation per group.
Parameters
The names of the columns to compute the standard deviation of. These must be existing columns holding only primitive numbers, else an IllegalStateException or IllegalArgumentException is thrown.
The name of the resulting column. If null (the default), the name of the selected column is used if exactly one column is selected, and "std" otherwise. This name needs to be unique, else a DuplicateColumnPathInsertException is thrown.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Aggregates this Pivot by computing the standard deviation of the values of each suitable column separately, per group.
Returns a single DataRow with the pivot keys as (nested) columns, containing the standard deviation of each suitable column of the corresponding group.
All columns of a primitive number type (and all "mixed" Number columns) are taken into account; the other columns are simply left out of the result.
Columns inside column groups are also excluded. To include those in the standard deviation, flatten the DataFrame first.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
Check out the .Pivot Grammar
See also:
— the same, but for an explicit selection of columns.stdForstd{ columns }— a single standard deviation of all values in the selected columns, per group.Pivot aggregation— all other ways to aggregate aPivot.The Std Operation— an overview of allstdmodes.
For more information: See "pivot statistics" on the documentation website., and See "Pivot Aggregation statistics" on the documentation website.
Example
// For each city, the standard deviation of each number column ("age" and "weight")
df.pivot { city }.std()Return
A single DataRow with the standard deviation of each suitable column per pivot group.
Parameters
If false (the default), the resulting columns are indexed first by the pivot key(s) and then by the names of the aggregated columns. If true, this order is reversed: the results are grouped by aggregated column first.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Aggregates this Pivot by computing a single standard deviation of all the values in the selected columns, per group.
Returns a single DataRow with the pivot keys as (nested) columns, containing the standard deviation of all the values in the selected columns of the corresponding group.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See Selecting Columns, or check out the .Pivot Grammar
See also:
std()— the standard deviation of each suitable column separately, per group.— the standard deviation of each selected column separately, per group.stdForPivot aggregation— all other ways to aggregate aPivot.The Std Operation— an overview of allstdmodes.
For more information: See "pivot statistics" on the documentation website., and See "Pivot Aggregation statistics" on the documentation website.
Example
// For each city, the standard deviation of all values in the "age" and "weight" columns
df.pivot { city }.std { age and weight }Return
A DataRow with, per pivot group, a single standard deviation of all the values in the selected columns.
Parameters
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
The ColumnsSelector used to select the columns to compute the standard deviation of.
Aggregates this Pivot by computing a single standard deviation of all the values in the selected columns, per group.
Returns a single DataRow with the pivot keys as (nested) columns, containing the standard deviation of all the values in the selected columns of the corresponding group.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there is nothing to compute the standard deviation of (for instance, because the input was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
See Selecting Columns, or check out the .Pivot Grammar
See also:
std()— the standard deviation of each suitable column separately, per group.— the standard deviation of each selected column separately, per group.stdForPivot aggregation— all other ways to aggregate aPivot.The Std Operation— an overview of allstdmodes.
For more information: See "pivot statistics" on the documentation website., and See "Pivot Aggregation statistics" on the documentation website.
Example
// For each city, the standard deviation of all values in the "age" and "weight" columns
df.pivot { city }.std("age", "weight")Return
A DataRow with, per pivot group, a single standard deviation of all the values in the selected columns.
Parameters
The names of the columns to compute the standard deviation of. These must be existing columns holding only primitive numbers, else an IllegalStateException or IllegalArgumentException is thrown.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Aggregates this PivotGroupBy by computing the standard deviation of the values of each suitable column separately, per group.
Returns a DataFrame where each cell contains the standard deviation of each suitable column of the group corresponding to that pivot key (column) and groupBy key (row).
All columns of a primitive number type (and all "mixed" Number columns) are taken into account; the other columns are simply left out of the result.
Columns inside column groups are also excluded. To include those in the standard deviation, flatten the DataFrame first.
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there exists a group, but there is nothing to compute the standard deviation of (for instance, because the group was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
For empty pivot intersections, null or the set default is used.
Check out the .PivotGroupBy Grammar
See also:
— the same, but for an explicit selection of columns.stdForstd{ columns }— a single standard deviation of all values in the selected columns, per group.PivotGroupBy aggregation— all other ways to aggregate aPivotGroupBy.The Std Operation— an overview of allstdmodes.
For more information: See "pivot statistics" on the documentation website., and See "Pivot Aggregation statistics" on the documentation website.
Example
// Per city and last name, the standard deviation of each number column ("age" and "weight")
df.pivot { city }.groupBy { name.lastName }.std()Return
A DataFrame with the standard deviation of each suitable column per group.
Parameters
If false (the default), the resulting columns are indexed first by the pivot key(s) and then by the names of the aggregated columns. If true, this order is reversed: the results are grouped by aggregated column first.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Aggregates this PivotGroupBy by computing a single standard deviation of all the values in the selected columns, per group.
Returns a DataFrame where each cell contains the standard deviation of all the values in the selected columns of the group corresponding to that pivot key (column) and groupBy key (row).
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there exists a group, but there is nothing to compute the standard deviation of (for instance, because the group was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
For empty pivot intersections, null or the set default is used.
See Selecting Columns, or check out the .PivotGroupBy Grammar
See also:
std()— the standard deviation of each suitable column separately, per group.— the standard deviation of each selected column separately, per group.stdForPivotGroupBy aggregation— all other ways to aggregate aPivotGroupBy.The Std Operation— an overview of allstdmodes.
For more information: See "pivot statistics" on the documentation website., and See "Pivot Aggregation statistics" on the documentation website.
Example
// Per city and last name, the standard deviation of all values in the "age" and "weight" columns
df.pivot { city }.groupBy { name.lastName }.std { age and weight }Return
A DataFrame with, per group, a single standard deviation of all the values in the selected columns.
Parameters
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
The ColumnsSelector used to select the columns to compute the standard deviation of.
Aggregates this PivotGroupBy by computing a single standard deviation of all the values in the selected columns, per group.
Returns a DataFrame where each cell contains the standard deviation of all the values in the selected columns of the group corresponding to that pivot key (column) and groupBy key (row).
All primitive number types are supported: Byte, Short, Int, Long, Float, and Double. "Mixed" Number input is supported too, as long as it consists solely of those primitive numbers; its values are then first converted to their common type using UnifiedNumberTypeOptions.PRIMITIVES_ONLY, see number unification. Big numbers (, BigInteger) are not supported; BigDecimal them to a primitive number type first.convert
null values in the input are always ignored.
If the input contains values, the result will be NaNNaN, unless skipNaN is set to true.
The resulting standard deviation is always a Double and never null. Converting Long values to Double may lose precision for very large values.
For more information about the resulting types: See "std Type Conversion" on the documentation website.
Result cells for which there exists a group, but there is nothing to compute the standard deviation of (for instance, because the group was empty or contained only null values) simply become Double.NaN. The same holds when there are no more than ddof values, so, by default, for a single value.
For empty pivot intersections, null or the set default is used.
See Selecting Columns, or check out the .PivotGroupBy Grammar
See also:
std()— the standard deviation of each suitable column separately, per group.— the standard deviation of each selected column separately, per group.stdForPivotGroupBy aggregation— all other ways to aggregate aPivotGroupBy.The Std Operation— an overview of allstdmodes.
For more information: See "pivot statistics" on the documentation website., and See "Pivot Aggregation statistics" on the documentation website.
Example
// Per city and last name, the standard deviation of all values in the "age" and "weight" columns
df.pivot { city }.groupBy { name.lastName }.std("age", "weight")Return
A DataFrame with, per group, a single standard deviation of all the values in the selected columns.
Parameters
The names of the columns to compute the standard deviation of. These must be existing columns holding only primitive numbers, else an IllegalStateException or IllegalArgumentException is thrown.
"Delta Degrees of Freedom". The divisor used in the calculation is N - ddof, where N is the number of values. The default is 1, which applies Bessel's correction and computes the unbiased sample standard deviation (as in R). Use 0 for the population standard deviation (as in Numpy).
Deprecated
It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html