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
|
default FloatColumn |
asFloatColumn()
Returns a new FloatColumn containing a value for each value in this column
|
default IntColumn |
asIntColumn()
Returns a new IntColumn containing a value for each value in this column
|
default LongColumn |
asLongColumn()
Returns a new LongColumn containing a value for each value in this column
|
default ShortColumn |
asShortColumn() |
StringColumn |
asStringColumn()
Returns a StringColumn consisting of the (unformatted) String representation of this column
values
|
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(DoublePredicate predicate) |
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 extends Column<RT>,RT> |
mapInto(DoubleFunction<? extends RT> fun,
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 DoubleColumn |
pctChange(int periods) |
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) |
void |
setPrintFormatter(NumberColumnFormatter formatter) |
void |
setPrintFormatter(NumberFormat format,
String missingValueString) |
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, set, setMissing, setMissingTo, 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, isMissing, log10, log1p, logN, multiply, multiply, multiply, name, neg, normalize, pctChange, power, power, reciprocal, remainder, 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(BiPredicate<Number,Number> predicate, Number number)
eval
in interface NumberFilters
default Selection isIn(Number... numbers)
isIn
in interface NumberFilters
isIn
in interface NumberFilterSpec<Selection>
default Selection isIn(double... doubles)
isIn
in interface NumberFilters
isIn
in interface NumberFilterSpec<Selection>
default Selection isNotIn(Number... numbers)
isNotIn
in interface NumberFilters
isNotIn
in interface NumberFilterSpec<Selection>
default Selection isNotIn(double... doubles)
isNotIn
in interface NumberFilters
isNotIn
in interface NumberFilterSpec<Selection>
default Selection isMissing()
isMissing
in interface Column<T>
isMissing
in interface FilterSpec<Selection>
isMissing
in interface NumberFilters
default Selection isNotMissing()
isNotMissing
in interface Column<T>
isNotMissing
in interface FilterSpec<Selection>
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
- void setPrintFormatter(NumberFormat format, String missingValueString)
void setPrintFormatter(NumberColumnFormatter formatter)
default double reduce(double initial, DoubleBinaryOperator op)
initial
- initial valueop
- the operatordefault Optional<Double> reduce(DoubleBinaryOperator op)
op
- the operatordefault <R extends Column<RT>,RT> R mapInto(DoubleFunction<? extends RT> fun, 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 DoubleColumn pctChange(int periods)
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()
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()
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()
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 DoubleColumn asDoubleColumn()
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()
StringColumn asStringColumn()
Column
asStringColumn
in interface Column<T>
StringColumn
built using the column Column.getUnformattedString(int)
methodCopyright © 2019. All rights reserved.