public interface NumericColumn<T> extends Column<T>, NumberMapFunctions, NumberFilters
Modifier and Type | Method and Description |
---|---|
default double[] |
asDoubleArray() |
default DoubleColumn |
asDoubleColumn()
Returns a new DoubleColumn containing a value for each value in this column
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
|
default FloatColumn |
asFloatColumn()
Returns a new FloatColumn containing a value for each value in this column
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
|
default IntColumn |
asIntColumn()
Returns a new IntColumn containing a value for each value in this column
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
|
default LongColumn |
asLongColumn()
Returns a new LongColumn containing a value for each value in this column
The exact behavior when overridden depends on the type of the receiver (LongColumn, FloatColumn, etc.)
In this version, the result is a copy of the original
|
default ShortColumn |
asShortColumn() |
default int |
count(DoublePredicate test)
Counts the number of rows satisfying predicate
|
default int |
count(DoublePredicate test,
int max)
Counts the number of rows satisfying predicate, but only upto the max value
|
default Selection |
eval(BiPredicate<Number,Number> predicate,
Number number) |
default Selection |
eval(DoubleBiPredicate predicate,
DoubleColumn otherColumn) |
default Selection |
eval(DoubleBiPredicate predicate,
Number number) |
default Selection |
eval(DoublePredicate predicate) |
default Selection |
eval(DoubleRangePredicate predicate,
Number rangeStart,
Number rangeEnd) |
default double |
geometricMean() |
double |
getDouble(int index) |
default boolean |
isEmpty()
Returns true if the column has no data
|
default Selection |
isIn(double... doubles) |
default Selection |
isIn(Number... numbers) |
default Selection |
isMissing() |
default Selection |
isNotIn(double... doubles) |
default Selection |
isNotIn(Number... numbers) |
default Selection |
isNotMissing() |
default double |
kendalls(NumericColumn<?> otherColumn)
Returns the Kendall's Tau Rank correlation between the receiver and the otherColumn
|
default double |
kurtosis() |
NumericColumn<T> |
lag(int n)
Returns a column of the same type and size as the receiver, containing the receivers values offset by n.
|
default NumericColumn<T> |
lead(int n)
Returns a column of the same type as the receiver, containing the receivers values offset -n
For example if you lead a column containing 2, 3, 4 by 1, you get a column containing 3, 4, NA.
|
default <R> Column<R> |
mapInto(DoubleFunction<? extends R> fun,
Column<R> into)
Maps the function across all rows, appending the results to the provided Column
|
default double |
max() |
default Optional<Double> |
max(it.unimi.dsi.fastutil.doubles.DoubleComparator comp)
Returns the maximum row according to the provided Comparator
|
default double |
mean() |
default double |
median() |
default double |
min() |
default Optional<Double> |
min(it.unimi.dsi.fastutil.doubles.DoubleComparator comp)
Returns the minimum row according to the provided Comparator
|
default double |
pearsons(NumericColumn<?> otherColumn)
Returns the pearson's correlation between the receiver and the otherColumn
|
default double |
percentile(double percentile) |
default double |
populationVariance() |
default double |
product() |
default double |
quadraticMean()
Returns the quadraticMean, aka the root-mean-square, for all values in this column
|
default double |
quartile1() |
default double |
quartile3() |
default double |
range() |
default Optional<Double> |
reduce(DoubleBinaryOperator op)
Reduction with binary operator
|
default double |
reduce(double initial,
DoubleBinaryOperator op)
Reduction with binary operator and initial value
|
default NumberRollingColumn |
rolling(int windowSize) |
default double |
skewness() |
default double |
spearmans(NumericColumn<?> otherColumn)
Returns the Spearman's Rank correlation between the receiver and the otherColumn
|
default double |
standardDeviation() |
default Stats |
stats() |
default double |
sum() |
default Double |
summarize(Selection selection,
NumericAggregateFunction function)
Summarizes the data in this column for all rows where the current value matches the selection criteria
|
default Table |
summary() |
default double |
sumOfLogs() |
default double |
sumOfSquares() |
default double |
variance() |
default NumericColumn<T> |
where(Selection selection) |
allMatch, anyMatch, append, append, append, appendCell, appendCell, appendMissing, appendObj, asBytes, asList, asObjectArray, byteSize, clear, columnWidth, contains, copy, count, count, countMissing, countUnique, emptyCopy, emptyCopy, filter, first, get, getString, getUnformattedString, inRange, isMissing, last, map, mapInto, max, max, min, min, name, noneMatch, print, reduce, reduce, removeMissing, rowComparator, sampleN, sampleX, set, set, set, set, setMissing, setName, size, sortAscending, sortDescending, sorted, subset, title, type, unique
forEach, iterator, spliterator
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
abs, add, add, add, asPercent, asRatio, bin, cube, cubeRoot, cumProd, cumSum, difference, divide, divide, divide, log10, log1p, logN, multiply, multiply, multiply, name, neg, normalize, pctChange, power, remainder, round, roundInt, size, sqrt, square, subtract, subtract, subtract
isBetweenExclusive, isBetweenInclusive, isCloseTo, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNegative, isNonNegative, isNotEqualTo, isNotEqualTo, isPositive, isZero, size
default boolean isEmpty()
Column
isEmpty
in interface Column<T>
isEmpty
in interface NumberMapFunctions
default double[] asDoubleArray()
asDoubleArray
in interface NumberMapFunctions
default Selection eval(DoublePredicate predicate)
eval
in interface NumberFilters
default Selection eval(DoubleBiPredicate predicate, DoubleColumn otherColumn)
eval
in interface NumberFilters
default Selection eval(DoubleBiPredicate predicate, Number number)
eval
in interface NumberFilters
default Selection eval(BiPredicate<Number,Number> predicate, Number number)
eval
in interface NumberFilters
default Selection eval(DoubleRangePredicate predicate, Number rangeStart, Number rangeEnd)
eval
in interface NumberFilters
default Selection isIn(Number... numbers)
isIn
in interface NumberFilters
default Selection isIn(double... doubles)
isIn
in interface NumberFilters
default Selection isNotIn(Number... numbers)
isNotIn
in interface NumberFilters
default Selection isNotIn(double... doubles)
isNotIn
in interface NumberFilters
default Selection isMissing()
isMissing
in interface Column<T>
isMissing
in interface NumberFilters
default Selection isNotMissing()
isNotMissing
in interface Column<T>
isNotMissing
in interface NumberFilters
default int count(DoublePredicate test)
test
- the predicatedefault int count(DoublePredicate test, int max)
test
- the predicatemax
- the maximum number of rows to countdefault Optional<Double> max(it.unimi.dsi.fastutil.doubles.DoubleComparator comp)
comp
- default Optional<Double> min(it.unimi.dsi.fastutil.doubles.DoubleComparator comp)
comp
- default double reduce(double initial, DoubleBinaryOperator op)
initial
- initial valueop
- the operatordefault Optional<Double> reduce(DoubleBinaryOperator op)
op
- the operatordefault <R> Column<R> mapInto(DoubleFunction<? extends R> fun, Column<R> into)
fun
- function to mapinto
- Column to which results are appendeddefault NumericColumn<T> where(Selection selection)
default Double summarize(Selection selection, NumericAggregateFunction function)
Example: myColumn.summarize(myColumn.isLessThan(100), AggregateFunctions.count);
default double sum()
sum
in interface NumberMapFunctions
default double product()
default double mean()
default double median()
default double quartile1()
default double quartile3()
default double percentile(double percentile)
default double range()
default double max()
default double min()
default double variance()
default double populationVariance()
default double standardDeviation()
default double sumOfLogs()
default double sumOfSquares()
default double geometricMean()
default double quadraticMean()
default double kurtosis()
default double skewness()
default double pearsons(NumericColumn<?> otherColumn)
default double spearmans(NumericColumn<?> otherColumn)
otherColumn
- A NumberColumn with no missing valuesorg.apache.commons.math3.exception.NotANumberException
- if either column contains any missing valuesdefault double kendalls(NumericColumn<?> otherColumn)
default Stats stats()
default NumberRollingColumn rolling(int windowSize)
default NumericColumn<T> lead(int n)
Column
NumericColumn<T> lag(int n)
Column
For example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
double getDouble(int index)
getDouble
in interface NumberFilters
getDouble
in interface NumberMapFunctions
default LongColumn asLongColumn()
default IntColumn asIntColumn()
default FloatColumn asFloatColumn()
default DoubleColumn asDoubleColumn()
default ShortColumn asShortColumn()
Copyright © 2018. All rights reserved.