Class AggregateFunctions

java.lang.Object
tech.tablesaw.aggregate.AggregateFunctions

public class AggregateFunctions extends Object
Static utility class for pre-defined instances of AggregateFunction
  • Field Details

    • earliestDateTime

      public static final DateTimeAggregateFunction earliestDateTime
      A function that takes a column argument and returns the earliest date-time value in that column
    • earliestDate

      public static final DateAggregateFunction earliestDate
      A function that takes a column argument and returns the earliest date in that column
    • latestDate

      public static final DateAggregateFunction latestDate
      A function that takes a column argument and returns the latest date in that column
    • latestDateTime

      public static final DateTimeAggregateFunction latestDateTime
      A function that takes a column argument and returns the latest date-time value in that column
    • maxInstant

      public static final InstantAggregateFunction maxInstant
      A function that takes a column argument and returns the latest instant in that column
    • minInstant

      public static final InstantAggregateFunction minInstant
      A function that takes a column argument and returns the earliest Instant in that column
    • countTrue

      public static final BooleanIntAggregateFunction countTrue
      A function that takes a column argument and returns the number of true values in a column
    • allTrue

      public static final BooleanAggregateFunction allTrue
      A function that takes a column argument and returns true if all values in that column are true
    • anyTrue

      public static final BooleanAggregateFunction anyTrue
      A function that takes a column argument and returns true if at least one value in the column is true
    • noneTrue

      public static final BooleanAggregateFunction noneTrue
      A function that takes a column argument and returns true if no values in the column are true
    • countFalse

      public static final BooleanIntAggregateFunction countFalse
      A function that takes a column argument and returns the count of false values in the column
    • proportionTrue

      public static final BooleanDoubleAggregateFunction proportionTrue
      A function that takes a column argument and returns the proportion of values in that column that are true
    • proportionFalse

      public static final BooleanDoubleAggregateFunction proportionFalse
      A function that takes a column argument and returns the proportion of values in the column that are false
    • first

      public static final NumericAggregateFunction first
      A function that takes a NumericColumn argument and returns the first item without sorting
    • last

      public static final NumericAggregateFunction last
      A function that takes a NumericColumn argument and returns the last item without sorting
    • change

      public static final NumericAggregateFunction change
      A function that takes a NumericColumn argument and returns the difference between the last and first items
    • pctChange

      public static final NumericAggregateFunction pctChange
      A function that takes a NumericColumn argument and returns the percent difference between the last and first items
    • countNonMissing

      public static final AnyIntAggregateFunction countNonMissing
      A function that takes a Column argument and returns the count of values in the column excluding missing values
    • count

      public static final AnyIntAggregateFunction count
      A function that takes a Column argument and returns the count of values in the column excluding missing values. A synonym for countNonMissing
    • countMissing

      public static final AnyIntAggregateFunction countMissing
      A function that takes a NumericColumn argument and returns the count of missing values in the column
    • countUnique

      public static final AnyIntAggregateFunction countUnique
      AA function that takes a Column argument and returns the number of non-missing unique values in the column
    • mean

      public static final NumericAggregateFunction mean
      A function that takes a NumericColumn argument and returns the mean of the values in the column
    • cv

      public static final NumericAggregateFunction cv
      A function that takes a NumericColumn argument and returns the coefficient of variation (stdDev/mean) of the values in the column
    • sum

      public static final NumericAggregateFunction sum
      A function that takes a NumericColumn argument and returns the sum of the values in the column
    • median

      public static final NumericAggregateFunction median
      A function that takes a NumericColumn argument and returns the median of the values in the column
    • countWithMissing

      public static final AnyIntAggregateFunction countWithMissing
      A function that takes a Column argument and returns the number of values in the column, including missing values
    • quartile1

      public static final NumericAggregateFunction quartile1
      A function that takes a NumericColumn argument and returns the first quartile of the values in the column
    • quartile3

      public static final NumericAggregateFunction quartile3
      A function that takes a NumericColumn argument and returns the third quartile of the values in the column
    • percentile90

      public static final NumericAggregateFunction percentile90
      A function that takes a NumericColumn argument and returns the 90th percentile of the values in the column
    • percentile95

      public static final NumericAggregateFunction percentile95
      A function that takes a NumericColumn argument and returns the 95th percentile of the values in the column
    • percentile99

      public static final NumericAggregateFunction percentile99
      A function that takes a NumericColumn argument and returns the 99th percentile of the values in the column
    • range

      public static final NumericAggregateFunction range
      A function that takes a NumericColumn argument and returns the difference between the largest and smallest values in the column
    • min

      public static final NumericAggregateFunction min
      A function that takes a NumericColumn argument and returns the smallest value in the column
    • max

      public static final NumericAggregateFunction max
      A function that takes a NumericColumn argument and returns the largeset value in the column
    • product

      public static final NumericAggregateFunction product
      A function that takes a NumericColumn argument and returns the product of all values in the column
    • geometricMean

      public static final NumericAggregateFunction geometricMean
      A function that takes a NumericColumn argument and returns the geometric mean of all values in the column
    • populationVariance

      public static final NumericAggregateFunction populationVariance
      A function that takes a NumericColumn argument and returns the population variance of all values in the column
    • quadraticMean

      public static final NumericAggregateFunction quadraticMean
      A function that takes a NumericColumn argument and returns the quadratic mean, aka, the root-mean-square
    • kurtosis

      public static final NumericAggregateFunction kurtosis
      A function that takes a NumericColumn argument and returns the kurtosis of its values
    • skewness

      public static final NumericAggregateFunction skewness
      A function that takes a NumericColumn argument and returns the skewness of its values
    • sumOfSquares

      public static final NumericAggregateFunction sumOfSquares
      A function that takes a NumericColumn argument and returns the sumOfSquares of its values
    • sumOfLogs

      public static final NumericAggregateFunction sumOfLogs
      A function that takes a NumericColumn argument and returns the sumOfLogs of its values
    • variance

      public static final NumericAggregateFunction variance
      A function that takes a NumericColumn argument and returns the variance of its values
    • stdDev

      public static final NumericAggregateFunction stdDev
      A function that takes a NumericColumn argument and returns the standard deviation of its values
    • standardDeviation

      @Deprecated public static final NumericAggregateFunction standardDeviation
      Deprecated.
      use stdDev instead
  • Method Details

    • percentile

      public static Double percentile(NumericColumn<?> data, Double percentile)
      Returns the given percentile of the values in the argument
    • meanDifference

      public static Double meanDifference(NumericColumn<?> column1, NumericColumn<?> column2)
      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

      public static Double sumDifference(NumericColumn<?> column1, NumericColumn<?> column2)
      Returns the given sum difference of the values in the arguments
      TODO(lwhite): These are two column reductions. We need a class for that