Package tech.tablesaw.aggregate
Class AggregateFunctions
java.lang.Object
tech.tablesaw.aggregate.AggregateFunctions
Static utility class for pre-defined instances of
AggregateFunction
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanAggregateFunction
A function that takes a column argument and returnstrue
if all values in that column are truestatic final BooleanAggregateFunction
A function that takes a column argument and returnstrue
if at least one value in the column is truestatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the difference between the last and first itemsstatic final AnyIntAggregateFunction
A function that takes aColumn
argument and returns the count of values in the column excluding missing values.static final BooleanIntAggregateFunction
A function that takes a column argument and returns the count offalse
values in the columnstatic final AnyIntAggregateFunction
A function that takes aNumericColumn
argument and returns the count of missing values in the columnstatic final AnyIntAggregateFunction
A function that takes aColumn
argument and returns the count of values in the column excluding missing valuesstatic final BooleanIntAggregateFunction
A function that takes a column argument and returns the number oftrue
values in a columnstatic final AnyIntAggregateFunction
AA function that takes aColumn
argument and returns the number of non-missing unique values in the columnstatic final AnyIntAggregateFunction
A function that takes aColumn
argument and returns the number of values in the column, including missing valuesstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the coefficient of variation (stdDev/mean) of the values in the columnstatic final DateAggregateFunction
A function that takes a column argument and returns the earliest date in that columnstatic final DateTimeAggregateFunction
A function that takes a column argument and returns the earliest date-time value in that columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the first item without sortingstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the geometric mean of all values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the kurtosis of its valuesstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the last item without sortingstatic final DateAggregateFunction
A function that takes a column argument and returns the latest date in that columnstatic final DateTimeAggregateFunction
A function that takes a column argument and returns the latest date-time value in that columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the largeset value in the columnstatic final InstantAggregateFunction
A function that takes a column argument and returns the latest instant in that columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the mean of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the median of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the smallest value in the columnstatic final InstantAggregateFunction
A function that takes a column argument and returns the earliest Instant in that columnstatic final BooleanAggregateFunction
A function that takes a column argument and returnstrue
if no values in the column are truestatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the percent difference between the last and first itemsstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the 90th percentile of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the 95th percentile of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the 99th percentile of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the population variance of all values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the product of all values in the columnstatic final BooleanDoubleAggregateFunction
A function that takes a column argument and returns the proportion of values in the column that arefalse
static final BooleanDoubleAggregateFunction
A function that takes a column argument and returns the proportion of values in that column that aretrue
static final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the quadratic mean, aka, the root-mean-squarestatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the first quartile of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the third quartile of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the difference between the largest and smallest values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the skewness of its valuesstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the standard deviation of its valuesstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the sum of the values in the columnstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the sumOfLogs of its valuesstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the sumOfSquares of its valuesstatic final NumericAggregateFunction
A function that takes aNumericColumn
argument and returns the variance of its values -
Method Summary
Modifier and TypeMethodDescriptionstatic Double
meanDifference
(NumericColumn<?> column1, NumericColumn<?> column2) Returns the given mean difference of the values in the arguments
TODO(lwhite): These are two column reductions.static Double
percentile
(NumericColumn<?> data, Double percentile) Returns the given percentile of the values in the argumentstatic Double
sumDifference
(NumericColumn<?> column1, NumericColumn<?> column2) Returns the given sum difference of the values in the arguments
TODO(lwhite): These are two column reductions.
-
Field Details
-
earliestDateTime
A function that takes a column argument and returns the earliest date-time value in that column -
earliestDate
A function that takes a column argument and returns the earliest date in that column -
latestDate
A function that takes a column argument and returns the latest date in that column -
latestDateTime
A function that takes a column argument and returns the latest date-time value in that column -
maxInstant
A function that takes a column argument and returns the latest instant in that column -
minInstant
A function that takes a column argument and returns the earliest Instant in that column -
countTrue
A function that takes a column argument and returns the number oftrue
values in a column -
allTrue
A function that takes a column argument and returnstrue
if all values in that column are true -
anyTrue
A function that takes a column argument and returnstrue
if at least one value in the column is true -
noneTrue
A function that takes a column argument and returnstrue
if no values in the column are true -
countFalse
A function that takes a column argument and returns the count offalse
values in the column -
proportionTrue
A function that takes a column argument and returns the proportion of values in that column that aretrue
-
proportionFalse
A function that takes a column argument and returns the proportion of values in the column that arefalse
-
first
A function that takes aNumericColumn
argument and returns the first item without sorting -
last
A function that takes aNumericColumn
argument and returns the last item without sorting -
change
A function that takes aNumericColumn
argument and returns the difference between the last and first items -
pctChange
A function that takes aNumericColumn
argument and returns the percent difference between the last and first items -
countNonMissing
A function that takes aColumn
argument and returns the count of values in the column excluding missing values -
count
A function that takes aColumn
argument and returns the count of values in the column excluding missing values. A synonym for countNonMissing -
countMissing
A function that takes aNumericColumn
argument and returns the count of missing values in the column -
countUnique
AA function that takes aColumn
argument and returns the number of non-missing unique values in the column -
mean
A function that takes aNumericColumn
argument and returns the mean of the values in the column -
cv
A function that takes aNumericColumn
argument and returns the coefficient of variation (stdDev/mean) of the values in the column -
sum
A function that takes aNumericColumn
argument and returns the sum of the values in the column -
median
A function that takes aNumericColumn
argument and returns the median of the values in the column -
countWithMissing
A function that takes aColumn
argument and returns the number of values in the column, including missing values -
quartile1
A function that takes aNumericColumn
argument and returns the first quartile of the values in the column -
quartile3
A function that takes aNumericColumn
argument and returns the third quartile of the values in the column -
percentile90
A function that takes aNumericColumn
argument and returns the 90th percentile of the values in the column -
percentile95
A function that takes aNumericColumn
argument and returns the 95th percentile of the values in the column -
percentile99
A function that takes aNumericColumn
argument and returns the 99th percentile of the values in the column -
range
A function that takes aNumericColumn
argument and returns the difference between the largest and smallest values in the column -
min
A function that takes aNumericColumn
argument and returns the smallest value in the column -
max
A function that takes aNumericColumn
argument and returns the largeset value in the column -
product
A function that takes aNumericColumn
argument and returns the product of all values in the column -
geometricMean
A function that takes aNumericColumn
argument and returns the geometric mean of all values in the column -
populationVariance
A function that takes aNumericColumn
argument and returns the population variance of all values in the column -
quadraticMean
A function that takes aNumericColumn
argument and returns the quadratic mean, aka, the root-mean-square -
kurtosis
A function that takes aNumericColumn
argument and returns the kurtosis of its values -
skewness
A function that takes aNumericColumn
argument and returns the skewness of its values -
sumOfSquares
A function that takes aNumericColumn
argument and returns the sumOfSquares of its values -
sumOfLogs
A function that takes aNumericColumn
argument and returns the sumOfLogs of its values -
variance
A function that takes aNumericColumn
argument and returns the variance of its values -
stdDev
A function that takes aNumericColumn
argument and returns the standard deviation of its values
-
-
Method Details
-
percentile
Returns the given percentile of the values in the argument -
meanDifference
Returns the given mean difference of the values in the arguments
TODO(lwhite): These are two column reductions. We need a class for that -
sumDifference
Returns the given sum difference of the values in the arguments
TODO(lwhite): These are two column reductions. We need a class for that
-